summaryrefslogtreecommitdiff
path: root/gst-libs/gst/app/gstappsrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/app/gstappsrc.c')
-rw-r--r--gst-libs/gst/app/gstappsrc.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/gst-libs/gst/app/gstappsrc.c b/gst-libs/gst/app/gstappsrc.c
index a6f531d38..c2267a045 100644
--- a/gst-libs/gst/app/gstappsrc.c
+++ b/gst-libs/gst/app/gstappsrc.c
@@ -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;
}