[MPlayer-dev-eng] [PATCH] Fix hang on demux of matroska files with 0byte-ints using 'mkv' demuxer

Sebastian Hagen sebastian_hagen at memespace.net
Sun Sep 5 07:05:42 CEST 2010


On 2010-09-05 06:37, Sebastian Hagen wrote:
> means, the auto-detection code will (among other things) try the 'mkv'
> demuxer, which will then hang, blocking demuxer selection and thereby
> playback of the mkv file. That the autodetection would ultimately prefer
> the 'lavf' over the 'mkv' muxer is irrelevant, since the hang produced
> by the latter doesn't allow the auto-detection function to terminate.
I took a closer look at this, and the details of what happens are:
1. Auto-detection tries 'lavf' demuxer.
2. 'lavf' demuxer fails to parse MKV file, because it makes the same 
incorrect assumption about 0byte-uints being disallowed as the 'mkv' one.
3. 'lavf' demuxer terminates unsuccessfully.
4. Auto-detection tries 'mkv' demuxer.
5. 'mkv' demuxer hangs because of the bug this patch is about.

I'll write a seperate patch to fix the parallel bug in the 'lavf' 
demuxer in a bit. However, I think this one should be applied regardless 
of how the other one is handled. The auto-detection code will reject the 
lavf muxer even for cases where it is doing everything right (e.g. mkv 
files that have no data streams), and will therefore still fall back to 
the 'mkv' demuxer in some cases even once this bug is fixed in the 
'lavf' one. Mplayer should not hang on demux even for pathological 
files, and fixing this bug in the 'mkv' demuxer is very simple.

Sebastian Hagen


More information about the MPlayer-dev-eng mailing list