GNOME Bugzilla – Bug 762239
matroskademux: Assertions about unmappable memory when demuxing wavpack streams
Last modified: 2016-04-14 17:43:09 UTC
Created attachment 321566 [details] first 2M of the stream We've got an mkv file that plays perfectly with vlc but not with gstreamer. Attached is a 2M-sized head of the file that is enough to reproduce the issue. Attempt to extract audio stream with gst-launch-1.0 -v filesrc location=head.mkv ! matroskademux ! wavpackparse ! wavpackdec ! alsasink results into Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstWavpackParse:wavpackparse0.GstPad:sink: caps = "audio/x-wavpack\,\ width\=\(int\)32\,\ framed\=\(boolean\)true\,\ channels\=\(int\)2\,\ rate\=\(int\)48000" (gst-launch-1.0:20800): GStreamer-CRITICAL **: gst_memory_unmap: assertion 'info->memory == mem' failed (gst-launch-1.0:20800): GStreamer-CRITICAL **: gst_memory_unmap: assertion 'info->memory == mem' failed (gst-launch-1.0:20800): GStreamer-CRITICAL **: gst_memory_unmap: assertion 'info->memory == mem' failed ... (gst-launch-1.0:20800): GStreamer-CRITICAL **: gst_memory_unmap: assertion 'info->memory == mem' failed ERROR: from element /GstPipeline:pipeline0/GstWavpackParse:wavpackparse0: No valid frames found before end of stream Additional debug info: gstbaseparse.c(1155): gst_base_parse_sink_event_default (): /GstPipeline:pipeline0/GstWavpackParse:wavpackparse0 ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Video stream extracts successfully with gst-launch-1.0 filesrc location=head.mkv ! matroskademux ! avdec_h264 ! xvimagesink although same assertions are continuously printed. Attempt to play entire file with playbin gives deadlock inside decodebin: no valid audio data does not allow decodebin to complete audio stream format detection, thus it keeps output video pad locked, queue overflows and things block. Deadlock can't be reproduced with 2M header, more data is needed, however this is obvious secondary issue. Root cause is in failure to extract audio stream, which is reproducible on 2M header.
commit 5664fd7635679016714a40a521b1622fbc636418 Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu Feb 18 11:09:36 2016 +0200 buffer: Protect against failing to map input memory when merging memories https://bugzilla.gnome.org/show_bug.cgi?id=762239 commit a7c3f353bdbbdfa5baa091677de22172e5230e83 Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu Feb 18 11:10:14 2016 +0200 matroskademux: Unmap wavpack header buffer after creating it Otherwise it will be mapped writable all the time and we can't read from it anywhere. https://bugzilla.gnome.org/show_bug.cgi?id=762239