Commit da9a3da8 authored by Sebastian Dröge's avatar Sebastian Dröge Committed by GStreamer Marge Bot

appsrc: Don't leak buffer list while wrongly unreffing buffer on EOS/flushing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1134>
parent fc7d65b1
......@@ -2003,16 +2003,24 @@ gst_app_src_push_internal (GstAppSrc * appsrc, GstBuffer * buffer,
flushing:
{
GST_DEBUG_OBJECT (appsrc, "refuse buffer %p, we are flushing", buffer);
if (steal_ref)
gst_buffer_unref (buffer);
if (steal_ref) {
if (buflist)
gst_buffer_list_unref (buflist);
else
gst_buffer_unref (buffer);
}
g_mutex_unlock (&priv->mutex);
return GST_FLOW_FLUSHING;
}
eos:
{
GST_DEBUG_OBJECT (appsrc, "refuse buffer %p, we are EOS", buffer);
if (steal_ref)
gst_buffer_unref (buffer);
if (steal_ref) {
if (buflist)
gst_buffer_list_unref (buflist);
else
gst_buffer_unref (buffer);
}
g_mutex_unlock (&priv->mutex);
return GST_FLOW_EOS;
}
......
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