+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):
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
#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;
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
#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;