Commit 65826f81 authored by Philipp Zabel's avatar Philipp Zabel Committed by Nicolas Dufresne

v4l2src: release buffer if create fails

gst_base_src_get_range does not expect a buffer to be returned in
the error case, so we are leaking a reference here if create fails.

https://bugzilla.gnome.org/show_bug.cgi?id=775014
parent 34db78b6
......@@ -873,6 +873,7 @@ alloc_failed:
}
error:
{
gst_buffer_replace (buf, NULL);
if (ret == GST_V4L2_FLOW_LAST_BUFFER) {
GST_ELEMENT_ERROR (src, RESOURCE, FAILED,
("Driver returned a buffer with no payload, this most likely "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment