After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751712 - buffer: gst_buffer_copy_into() should probably not copy GST_META_FLAG_POOLED metadata
buffer: gst_buffer_copy_into() should probably not copy GST_META_FLAG_POOLED ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal blocker
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 742385
 
 
Reported: 2015-06-30 10:52 UTC by Sebastian Dröge (slomo)
Modified: 2015-08-16 13:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
buffer: Don't copy POOLED and memory metadata unconditionally (2.87 KB, patch)
2015-06-30 11:38 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2015-06-30 10:52:40 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.
Comment 1 Sebastian Dröge (slomo) 2015-06-30 11:38:47 UTC
Created attachment 306388 [details] [review]
buffer: Don't copy POOLED and memory metadata unconditionally
Comment 2 Sebastian Dröge (slomo) 2015-06-30 16:43:05 UTC
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
Comment 3 Sebastian Dröge (slomo) 2015-06-30 20:36:59 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2015-07-01 08:46:22 UTC
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.