appsrc: Be sure that metadata is writable before setting caps
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Thu, 8 Apr 2010 10:39:08 +0000 (07:39 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Thu, 8 Apr 2010 10:40:29 +0000 (07:40 -0300)
Call gst_buffer_make_metadata_writable before attempting
to set caps on the buffer.

gst-libs/gst/app/gstappsrc.c

index 9b8d21d..25cf39f 100644 (file)
@@ -993,6 +993,7 @@ gst_app_src_create (GstBaseSrc * bsrc, guint64 offset, guint size,
       /* only update the offset when in random_access mode */
       if (priv->stream_type == GST_APP_STREAM_TYPE_RANDOM_ACCESS)
         priv->offset += buf_size;
+      *buf = gst_buffer_make_metadata_writable (*buf);
       gst_buffer_set_caps (*buf, priv->caps);
 
       /* signal that we removed an item */