buffer: do not touch memory tag flag when copying buffer flags

The tag memory flag will be set later if the memory is also copied. This
patch avoids buffers being freed needlessly in bufferpools.

https://bugzilla.gnome.org/show_bug.cgi?id=735574
This commit is contained in:
Arnaud Vrac 2014-08-26 20:14:40 +02:00 committed by Sebastian Dröge
parent b0fff643dc
commit f0deb37a86

View file

@ -397,7 +397,11 @@ gst_buffer_copy_into (GstBuffer * dest, GstBuffer * src,
if (flags & GST_BUFFER_COPY_FLAGS) {
/* copy flags */
GST_MINI_OBJECT_FLAGS (dest) = GST_MINI_OBJECT_FLAGS (src);
guint flags_mask = ~GST_BUFFER_FLAG_TAG_MEMORY;
GST_MINI_OBJECT_FLAGS (dest) =
(GST_MINI_OBJECT_FLAGS (src) & flags_mask) |
(GST_MINI_OBJECT_FLAGS (dest) & ~flags_mask);
}
if (flags & GST_BUFFER_COPY_TIMESTAMPS) {