mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
gst/gstbuffer.c: Copy selected buffer-flags when creating subbuffers.
Original commit message from CVS: * gst/gstbuffer.c: Copy selected buffer-flags when creating subbuffers. Fixes #516395.
This commit is contained in:
parent
109511b55b
commit
f09aa1dd08
3 changed files with 17 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-02-15 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* gst/gstbuffer.c:
|
||||
Copy selected buffer-flags when creating subbuffers.
|
||||
Fixes #516395.
|
||||
|
||||
2008-02-12 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* gst/gstbuffer.c: (gst_buffer_class_init), (gst_buffer_finalize):
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 05a617c9043ddb78f8578195b18c166d7e1d4c2e
|
||||
Subproject commit 2a19465fdb43a75f4d32950fd2beb1beb950eec2
|
|
@ -464,12 +464,6 @@ gst_buffer_make_metadata_writable (GstBuffer * buf)
|
|||
} else {
|
||||
ret = gst_buffer_create_sub (buf, 0, GST_BUFFER_SIZE (buf));
|
||||
|
||||
/* copy all the flags except IN_CAPS */
|
||||
GST_BUFFER_FLAGS (ret) = GST_BUFFER_FLAGS (buf);
|
||||
GST_BUFFER_FLAG_UNSET (ret, GST_BUFFER_FLAG_IN_CAPS);
|
||||
/* data should always be set to READONLY */
|
||||
GST_BUFFER_FLAG_SET (ret, GST_BUFFER_FLAG_READONLY);
|
||||
|
||||
gst_buffer_unref (buf);
|
||||
}
|
||||
|
||||
|
@ -599,6 +593,16 @@ gst_buffer_create_sub (GstBuffer * buffer, guint offset, guint size)
|
|||
GST_BUFFER_DATA (GST_BUFFER_CAST (subbuffer)) = buffer->data + offset;
|
||||
GST_BUFFER_SIZE (GST_BUFFER_CAST (subbuffer)) = size;
|
||||
|
||||
if ((offset == 0) && (size == GST_BUFFER_SIZE (buffer))) {
|
||||
/* copy all the flags except IN_CAPS */
|
||||
GST_BUFFER_FLAG_SET (subbuffer, GST_BUFFER_FLAGS (buffer));
|
||||
GST_BUFFER_FLAG_UNSET (subbuffer, GST_BUFFER_FLAG_IN_CAPS);
|
||||
} else {
|
||||
/* copy only PREROLL & GAP flags */
|
||||
GST_BUFFER_FLAG_SET (subbuffer, (GST_BUFFER_FLAGS (buffer) &
|
||||
(GST_BUFFER_FLAG_PREROLL | GST_BUFFER_FLAG_GAP)));
|
||||
}
|
||||
|
||||
/* we can copy the timestamp and offset if the new buffer starts at
|
||||
* offset 0 */
|
||||
if (offset == 0) {
|
||||
|
|
Loading…
Reference in a new issue