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
This commit is contained in:
parent
34db78b645
commit
65826f819a
@ -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 "
|
||||
|
Loading…
x
Reference in New Issue
Block a user