[gstreamer-bugs] [Bug 314710] gst_buffer_create_sub doesn't copy the GST_BUFFER_FLAGS

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Sep 27 07:17:25 PDT 2005


Do not reply to this email.  You can add comments to this bug at
 http://bugzilla.gnome.org/show_bug.cgi?id=314710
 GStreamer | gstreamer (core) | Ver: HEAD CVS

Tim-Philipp Müller changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #51462|                            |commented-on
             Status|                            |
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|HEAD                        |0.9.3



------- Additional Comments From Tim-Philipp Müller  2005-09-27 14:17 -------
Nice catch! And thanks for the patch.


We had a discussion on IRC about this and came to the conclusion that just
copying all flags of the parent buffer doesn't seem like the right thing to do,
even if there is the possibility that GstBuffer subclasses add their own flags
which then get lost when doing _create_sub(). I guess we'll deal with that when
it becomes a problem, so I've just fixed the case at hand for now.


2005-09-27  Tim-Philipp Muller  <tim at centricular dot net>

        * gst/gstbuffer.c: (gst_subbuffer_init):
          Set READONLY flag on subbuffers, so that gst_buffer_make_writable()
          works correctly in all circumstances (we could have just copied
          the parent buffer's readonly flag, but conceptually it seems
          cleaner to mark all subbuffers as read-only). (based on patch
          by Alessandro Decina, #314710).

        * check/gst/gstbuffer.c: (create_read_only_buffer),
        (test_make_writable), (test_subbuffer_make_writable),
        (gst_test_suite):
          Add some tests for gst_buffer_make_writable().

Cheers
 -Tim


------- You are receiving this mail because: -------
You are the assignee for the bug.
You are the QA contact for the bug.




More information about the Gstreamer-bugs mailing list