GNOME Bugzilla – Bug 582702
qtmux: crash in atom_moov_add_blob_tag
Last modified: 2009-05-15 13:07:00 UTC
ginger:~$ gdb -args gst-launch-0.10 filesrc location=media/wowow.mp4 ! decodebin ! ffmpegcolorspace ! qtmux ! fakesink -t GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... (gdb) r Starting program: /usr/local/bin/gst-launch-0.10 filesrc location=media/wowow.mp4 \! decodebin \! ffmpegcolorspace \! qtmux \! fakesink -t [Thread debugging using libthread_db enabled] [New Thread 0xb7a606c0 (LWP 12480)] Setting pipeline to PAUSED ... [New Thread 0xb78cfb90 (LWP 12484)] Pipeline is PREROLLING ... [New Thread 0xb6dffb90 (LWP 12485)] FOUND TAG : found by element "qtdemux0". audio codec: MPEG-4 AAC audio [New Thread 0xb5e2ab90 (LWP 12486)] FOUND TAG : found by element "qtdemux0". video codec: H.264 / AVC FOUND TAG : found by element "qtdemux0". QT atom: buffer of 29 bytes, type: application/x-gst-qt-gsst-tag, style=(string)itunes : buffer of 30 bytes, type: application/x-gst-qt-gstd-tag, style=(string)itunes FOUND TAG : found by element "ewh264dec0". video codec: H.264 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Program received signal SIGSEGV, Segmentation fault.
+ Trace 215471
Thread 3051531152 (LWP 12486)
This apparently has to do with the "itunes" style tag. It doesn't crash if I apply this patch (which obviously isn't a fix): diff --git a/gst/qtmux/gstqtmux.c b/gst/qtmux/gstqtmux.c index b0df9d7..5c8de8e 100644 --- a/gst/qtmux/gstqtmux.c +++ b/gst/qtmux/gstqtmux.c @@ -533,7 +533,7 @@ gst_qt_mux_add_metadata_tags (GstQTMux * qtmux, const GstTag s = gst_caps_get_structure (caps, 0); if (s && (style = gst_structure_get_string (s, "style"))) { /* FIXME make into a parameter */ - if (strcmp (style, "itunes") == 0) { + if (0 && strcmp (style, "itunes") == 0) { GST_DEBUG_OBJECT (qtmux, "Adding private tag"); atom_moov_add_blob_tag (qtmux->moov, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
I'm tracking the problem, it seems that 'udta' is null at the line: 2550: ilst = moov->udta->meta->ilst; that gdb reports. That's because atom_moov_init_metatags is not being called before atom_moov_append_tag in atom_moov_add_blob_tag. I'll attach a patch to call atom_moov_init_metatags from inside atom_moov_append_tag, it is safer.
Created attachment 134684 [details] [review] The patch.
Patch seems sensible
Commited. commit 405f80dec487103dfe52e6ce6aa3fb05db74e495 (patch) tree 5411b39780c267cdcd7e763a2e4bccf163807197 parent f5ba4904f794a107bc5d1e56f824789bca295383 (diff) [qtmux] Fixes segfault when adding a blob as first tag.master Moves tags data initialization to the function that actually appends the tags to the list. Fixes #582702 Also fixes some style caught by the pre-commit hook.