From 26993420c06aacfa52c883dea04d07ad542b079f Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Tue, 9 Aug 2011 09:05:31 +0100 Subject: [PATCH] ximagesrc: clear flags on buffer reuse This will ensure a logically new buffer does not keep flags from a previous use of that buffer (eg, DISCONT would be set on the first buffer, and mistakenly kept when reused). https://bugzilla.gnome.org/show_bug.cgi?id=653709 --- sys/ximage/gstximagesrc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/ximage/gstximagesrc.c b/sys/ximage/gstximagesrc.c index e705ccbe32..94d4bcd1f4 100644 --- a/sys/ximage/gstximagesrc.c +++ b/sys/ximage/gstximagesrc.c @@ -99,6 +99,7 @@ gst_ximage_src_return_buf (GstXImageSrc * ximagesrc, /* need to increment the refcount again to recycle */ gst_buffer_ref (GST_BUFFER (ximage)); g_mutex_lock (ximagesrc->pool_lock); + GST_BUFFER_FLAGS (GST_BUFFER (ximage)) = 0; /* clear out any flags from the previous use */ ximagesrc->buffer_pool = g_slist_prepend (ximagesrc->buffer_pool, ximage); g_mutex_unlock (ximagesrc->pool_lock); }