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 762239 - matroskademux: Assertions about unmappable memory when demuxing wavpack streams
matroskademux: Assertions about unmappable memory when demuxing wavpack streams
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.4.5
Other Linux
: Normal normal
: 1.6.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
1.6.4
Depends on:
Blocks:
 
 
Reported: 2016-02-18 08:39 UTC by Nikita Yushchenko
Modified: 2016-04-14 17:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first 2M of the stream (2.00 MB, video/x-matroska)
2016-02-18 08:39 UTC, Nikita Yushchenko
Details

Description Nikita Yushchenko 2016-02-18 08:39:06 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.
Comment 1 Sebastian Dröge (slomo) 2016-02-18 09:12:32 UTC
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