mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
gst/elements/gstfilesrc.c: Set READONLY flag on mmap'ed buffers, otherwise gst_buffer_make_writable() won't work prop...
Original commit message from CVS: * gst/elements/gstfilesrc.c: (gst_mmap_buffer_init), (gst_file_src_map_region): Set READONLY flag on mmap'ed buffers, otherwise gst_buffer_make_writable() won't work properly (#314708).
This commit is contained in:
parent
cd599c3718
commit
09f803fd76
3 changed files with 17 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-08-31 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_init),
|
||||
(gst_file_src_map_region):
|
||||
Set READONLY flag on mmap'ed buffers, otherwise
|
||||
gst_buffer_make_writable() won't work properly (#314708).
|
||||
|
||||
2005-08-31 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/base/gstbasetransform.c: (gst_base_transform_handle_buffer):
|
||||
|
|
|
@ -429,7 +429,12 @@ gst_mmap_buffer_class_init (gpointer g_class, gpointer class_data)
|
|||
static void
|
||||
gst_mmap_buffer_init (GTypeInstance * instance, gpointer g_class)
|
||||
{
|
||||
GstBuffer *buf = (GstBuffer *) instance;
|
||||
|
||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_READONLY);
|
||||
/* before we re-enable this flag, we probably need to fix _copy()
|
||||
* _make_writable(), etc. in GstMiniObject/GstBuffer as well */
|
||||
/* GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_ORIGINAL); */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -500,9 +505,6 @@ gst_file_src_map_region (GstFileSrc * src, off_t offset, size_t size)
|
|||
#endif
|
||||
|
||||
/* fill in the rest of the fields */
|
||||
/* FIXME */
|
||||
//GST_BUFFER_FLAG_SET (buf, GST_BUFFER_READONLY);
|
||||
//GST_BUFFER_FLAG_SET (buf, GST_BUFFER_ORIGINAL);
|
||||
GST_BUFFER_SIZE (buf) = size;
|
||||
GST_BUFFER_OFFSET (buf) = offset;
|
||||
GST_BUFFER_OFFSET_END (buf) = offset + size;
|
||||
|
|
|
@ -429,7 +429,12 @@ gst_mmap_buffer_class_init (gpointer g_class, gpointer class_data)
|
|||
static void
|
||||
gst_mmap_buffer_init (GTypeInstance * instance, gpointer g_class)
|
||||
{
|
||||
GstBuffer *buf = (GstBuffer *) instance;
|
||||
|
||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_READONLY);
|
||||
/* before we re-enable this flag, we probably need to fix _copy()
|
||||
* _make_writable(), etc. in GstMiniObject/GstBuffer as well */
|
||||
/* GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_ORIGINAL); */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -500,9 +505,6 @@ gst_file_src_map_region (GstFileSrc * src, off_t offset, size_t size)
|
|||
#endif
|
||||
|
||||
/* fill in the rest of the fields */
|
||||
/* FIXME */
|
||||
//GST_BUFFER_FLAG_SET (buf, GST_BUFFER_READONLY);
|
||||
//GST_BUFFER_FLAG_SET (buf, GST_BUFFER_ORIGINAL);
|
||||
GST_BUFFER_SIZE (buf) = size;
|
||||
GST_BUFFER_OFFSET (buf) = offset;
|
||||
GST_BUFFER_OFFSET_END (buf) = offset + size;
|
||||
|
|
Loading…
Reference in a new issue