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
This commit is contained in:
Vincent Penquerc'h 2011-08-09 09:05:31 +01:00 committed by Sebastian Dröge
parent 639abf01f9
commit 26993420c0

View file

@ -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);
}