mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
Inherit some of parent's buffer flags.
Original commit message from CVS: Inherit some of parent's buffer flags.
This commit is contained in:
parent
40e14cf2b7
commit
d1e5984afa
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-01-11 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/gstbuffer.c: (gst_buffer_create_sub): Subbuffers should
|
||||
inherit correct flags (READONLY and DONTKEEP).
|
||||
|
||||
2004-01-11 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/elements/gstfilesrc.c: (gst_filesrc_free_parent_mmap),
|
||||
|
|
|
@ -295,9 +295,13 @@ gst_buffer_create_sub (GstBuffer *parent, guint offset, guint size)
|
|||
|
||||
GST_BUFFER_DURATION (buffer) = GST_CLOCK_TIME_NONE;
|
||||
GST_BUFFER_OFFSET_END (buffer) = GST_BUFFER_OFFSET_NONE;
|
||||
/* make sure nobody overwrites data as it would overwrite in the parent.
|
||||
* data in parent cannot be overwritten because we hold a ref */
|
||||
GST_DATA_FLAG_SET (parent, GST_DATA_READONLY);
|
||||
|
||||
if (GST_BUFFER_FLAG_IS_SET (parent, GST_BUFFER_DONTKEEP)) {
|
||||
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_DONTKEEP);
|
||||
}
|
||||
if (GST_BUFFER_FLAG_IS_SET (parent, GST_BUFFER_READONLY)) {
|
||||
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_READONLY);
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue