appsrc: Be sure that metadata is writable before setting caps

Call gst_buffer_make_metadata_writable before attempting
to set caps on the buffer.
This commit is contained in:
Thiago Santos 2010-04-08 07:39:08 -03:00
parent e528e73268
commit 818e869d70

View 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 */