GNOME Bugzilla – Bug 751712
buffer: gst_buffer_copy_into() should probably not copy GST_META_FLAG_POOLED metadata
Last modified: 2015-08-16 13:40:23 UTC
See summary. I'm not entirely sure what the point of the meta flag is, but it seems like it is meant to be linked to a specific buffer from a pool and not to be copied to other buffers. Might also need to consider not to copy metadata with _gst_meta_tag_memory if memory is merged or copied.
Created attachment 306388 [details] [review] buffer: Don't copy POOLED and memory metadata unconditionally
commit 7a08fa5ec4804f104e9aa9f458322f6eb49a7e49 Author: Sebastian Dröge <sebastian@centricular.com> Date: Tue Jun 30 13:38:10 2015 +0200 buffer: Don't copy POOLED and memory metadata unconditionally https://bugzilla.gnome.org/show_bug.cgi?id=751712
As noticed on IRC, this is not completely correct. videometa has the memory tag but should generally be copied. However it also seems not safe to copy it always (custom map functions that require the original memory), and definitely not safe to copy always copy all metas with the memory tag.
commit fefd4622a328f3ba5ac0c091e83d8fc6814edbda Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Jul 1 10:45:01 2015 +0200 adapter: Also copy POOL metas and make sure to copy over metas when creating subbuffers POOL meta just means that this specific instance of the meta is related to a pool, a copy should be made when reasonable and the flag should just not be set in the copy. commit 0aae36567d2e2c9109823c783d7e920cebef6a3f Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Jul 1 10:36:36 2015 +0200 buffer: Don't copy "memory" metas unconditionally Don't copy memory metas if we only copied part of the buffer, didn't copy memories or merged memories. In all these cases the memory structure has changed and the memory meta becomes meaningless. https://bugzilla.gnome.org/show_bug.cgi?id=751712 commit d43f256a9e1acc69c85bf3898e142cdf8bce7def Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Jul 1 10:25:15 2015 +0200 Revert "buffer: Don't copy POOLED and memory metadata unconditionally" This reverts commit 7a08fa5ec4804f104e9aa9f458322f6eb49a7e49.