GNOME Bugzilla – Bug 657250
rsndvdbin attempts to modify read only metadata
Last modified: 2011-08-24 16:06:13 UTC
gst-launch rsndvdbin device=/dev/dvd ! fakesink [...] Pipeline is PREROLLING ... (gst-launch-0.10:13404): GStreamer-WARNING **: (gstbuffer.c:240):gst_buffer_copy_metadata: runtime check failed: (gst_buffer_is_metadata_writable (dest)) Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock (gst-launch-0.10:13404): GStreamer-WARNING **: (gstbuffer.c:240):gst_buffer_copy_metadata: runtime check failed: (gst_buffer_is_metadata_writable (dest)) (gst-launch-0.10:13404): GStreamer-WARNING **: (gstbuffer.c:240):gst_buffer_copy_metadata: runtime check failed: (gst_buffer_is_metadata_writable (dest)) (gst-launch-0.10:13404): GStreamer-WARNING **: (gstbuffer.c:240):gst_buffer_copy_metadata: runtime check failed: (gst_buffer_is_metadata_writable (dest)) (gst-launch-0.10:13404): GStreamer-WARNING **: (gstbuffer.c:240):gst_buffer_copy_metadata: runtime check failed: (gst_buffer_is_metadata_writable (dest)) (gst-launch-0.10:13404): GStreamer-WARNING **: (gstbuffer.c:240):gst_buffer_copy_metadata: runtime check failed: (gst_buffer_is_metadata_writable (dest)) (gst-launch-0.10:13404): GStreamer-WARNING **: (gstbuffer.c:240):gst_buffer_copy_metadata: runtime check failed: (gst_buffer_is_metadata_writable (dest))
Created attachment 194605 [details] [review] rsndvd: ensure metadata is writable when writing to it This seems OK, though I am not certain. It gets rid of the warnings anyway, and piping to decodebin ! xvimagesink still gives video.
Comment on attachment 194605 [details] [review] rsndvd: ensure metadata is writable when writing to it > buf = gst_buffer_ref (wrap_buf->wrapped_buffer); >+ buf = gst_buffer_make_metadata_writable (buf); This doesn't look right at first glance. _ref() adds a ref, whereas make_metadata_writable() takes ownership of the existing ref, so while it may have fixed the metadata warning, it would seem that you're one ref short now compared to what was there previously.
I had a look at the implementation of _make_metadata_writable, and the case where the buffer is already writable does not remove or add a ref. Since the calling code is not meant to know in advance whether the buffer is writable or not, I'd expect the other code path to also not add or remove a ref, no ?
Oh, I'm sorry, I completely misread the patch. I saw an imaginary '-' where there isn't one.
commit 04f7876f94bc9febd9dd073fca92af6b87259af2 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Wed Aug 24 15:32:12 2011 +0100 rsndvd: ensure metadata is writable when writing to it https://bugzilla.gnome.org/show_bug.cgi?id=657250