GNOME Bugzilla – Bug 640028
[qtdemux] crash on malformed mov stream
Last modified: 2011-01-20 11:24:12 UTC
qtdemux seems to crash on certain malformed mov movies. This particular sort of deformity may be more prevalent in the wild because they are created by recent versions of ffmpeg attempting to mux adpcm_ms. Logs: $ gdb --args gst-launch-0.10 filesrc location=ff_adpcm_ms.mov ! decodebin GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 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 "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/gst-launch-0.10...(no debugging symbols found)...done. (gdb) r Starting program: /usr/bin/gst-launch-0.10 filesrc location=ff_adpcm_ms.mov \! decodebin [Thread debugging using libthread_db enabled] Setting pipeline to PAUSED ... [New Thread 0x7ffff37d8710 (LWP 14984)] Pipeline is PREROLLING ... Program received signal SIGSEGV, Segmentation fault.
+ Trace 225599
Thread 140737278478096 (LWP 14984)
^C==14986== ==14986== HEAP SUMMARY: ==14986== in use at exit: 3,039,325 bytes in 17,538 blocks ==14986== total heap usage: 28,464 allocs, 10,926 frees, 3,682,389 bytes allocated ==14986== ==14986== LEAK SUMMARY: ==14986== definitely lost: 145 bytes in 5 blocks ==14986== indirectly lost: 240 bytes in 10 blocks ==14986== possibly lost: 2,842,050 bytes in 15,506 blocks ==14986== still reachable: 196,890 bytes in 2,017 blocks ==14986== suppressed: 0 bytes in 0 blocks ==14986== Rerun with --leak-check=full to see details of leaked memory ==14986== ==14986== For counts of detected and suppressed errors, rerun with: -v ==14986== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 46 from 7) Killed
Created attachment 178813 [details] FFmpeg muxed MS ADPCM in mov
Created attachment 178821 [details] [review] qtdemux: Gracefully handle mov files misusing the WAVE atoms Check that the WAVEHEADER node is present instead of blindly using it. If not present we won't be able to provide a more refined caps, but at least we won't crash.
This might not be the 'perfect' fix btw. There is some data ('glbl' atom) we're not handling in qtdemux which might contain the needed waveheader info. But at least that patch (1) avoids the crash, (2) plays the file even if it sounds crap.
commit 6d545e29add17f1c02ee4fe5623409ed63369c17 Author: Edward Hervey <edward.hervey@collabora.co.uk> Date: Thu Jan 20 11:45:47 2011 +0100 qtdemux: Gracefully handle mov files misusing the WAVE atoms Check that the WAVEHEADER node is present instead of blindly using it. If not present we won't be able to provide a more refined caps, but at least we won't crash. https://bugzilla.gnome.org/show_bug.cgi?id=640028