Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
appsrc: Don't leak buffer list while wrongly unreffing buffer on EOS/…
  • Loading branch information
sdroege authored and GStreamer Marge Bot committed May 3, 2021
1 parent fc7d65b commit da9a3da
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions gst-libs/gst/app/gstappsrc.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit da9a3da

Please sign in to comment.