After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657250 - rsndvdbin attempts to modify read only metadata
rsndvdbin attempts to modify read only metadata
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-08-24 14:20 UTC by Vincent Penquerc'h
Modified: 2011-08-24 16:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rsndvd: ensure metadata is writable when writing to it (967 bytes, patch)
2011-08-24 14:34 UTC, Vincent Penquerc'h
committed Details | Review

Description Vincent Penquerc'h 2011-08-24 14:20:24 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))
Comment 1 Vincent Penquerc'h 2011-08-24 14:34:14 UTC
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 2 Tim-Philipp Müller 2011-08-24 14:45:12 UTC
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.
Comment 3 Vincent Penquerc'h 2011-08-24 14:56:45 UTC
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 ?
Comment 4 Tim-Philipp Müller 2011-08-24 15:02:10 UTC
Oh, I'm sorry, I completely misread the patch. I saw an imaginary '-' where there isn't one.
Comment 5 Tim-Philipp Müller 2011-08-24 16:05:55 UTC
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