GNOME Bugzilla – Bug 682276
matroskademux: Discards all video until the first keyframe, even if container keyframe information is wrong
Last modified: 2014-04-07 20:45:57 UTC
Hi, The following file (60MB) will not preroll when the video pad is connected: http://absolut.zogzog.org/share/samples/mkv/tlf-terminator.2.judgment.day.720bd.sample.mkv The video track is detected and caps are set, however no data is ever sent on the pad. The video plays fine with VLC or mplayer.
Confirmed, it times out with gst-discoverer-1.0 <file>
there is indeed something wrong, just doing matroskademux ! video/x-h264 ! fakesink results in the following output: E (type: stream-start E (type: caps E (type: segment E (type: tag E (type: tag E (type: segment E (type: eos with no buffers outputted
Still present in 1.0.2.
This pretty much looks like bug #580980, and is likely due to matroskademux discarding (video) data until it comes across a keyframe. It seems to be the only demuxer doing so (?), and IMHO trying to cater that much for (broken?) subsequent decoder likely creates more problems (such as this) than it avoids ...
I think I agree with you there. (And in that scenario it could probably even detect the absence of keyframes in the index and conclude that something is not right, but may just as well let the parser and/or decoder handle it.)
It is the only demuxer currently doing that but it would be useful to have that in other demuxers too. It's something that the decoder can't really do, the decoder still needs to decode all frames even if the QoS earliest_time is far in the future because it doesn't know when the next keyframe would be.
My comment 6 does not make any sense at all, it must've been for another bug. Let's just fix this :) commit 809d1059820aae5eec87ebffbd1608c12c44575d Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Jan 15 22:47:12 2014 +0100 matroskademux: Don't skip all video frames until the first keyframe Instead do it like all other demuxers and let parsers and decoders handle that. The keyframe information inside the container might be completely wrong like in the sample file of the bug report, and if it is correct and we push no keyframes, then the parsers and decoders will handle that properly anyway. https://bugzilla.gnome.org/show_bug.cgi?id=682276
This change might have introduced a crash. See bug 727779.