autoconvert: Fix two memory leaks on error conditions

Both the sink_chain and sink_chain_list will neither pass
or free the buffer if the internal src pad doesn't exist yet.

https://bugzilla.gnome.org/show_bug.cgi?id=788035
This commit is contained in:
James Stevenson 2017-09-22 08:10:44 +01:00 committed by Tim-Philipp Müller
parent 980ddfdfb7
commit 9d5d9897e5

View file

@ -923,6 +923,7 @@ gst_auto_convert_sink_chain (GstPad * pad, GstObject * parent,
} else {
GST_ERROR_OBJECT (autoconvert, "Got buffer without an negotiated element,"
" returning not-negotiated");
gst_buffer_unref (buffer);
}
return ret;
@ -944,6 +945,7 @@ gst_auto_convert_sink_chain_list (GstPad * pad, GstObject * parent,
} else {
GST_ERROR_OBJECT (autoconvert, "Got buffer without an negotiated element,"
" returning not-negotiated");
gst_buffer_list_unref (list);
}
return ret;