[vlc-devel] [PATCH] demux:mkv: detect bogus MPEG-2 framing from MakeMKV

Steve Lhomme robux4 at ycbcr.xyz
Thu Jan 18 15:31:36 CET 2018


Le 18/01/2018 à 14:37, Francois Cartegnie a écrit :
> Le 18/01/2018 à 14:02, Steve Lhomme a écrit :
>> This software doesn't put mpeg-2 frames properly in mkv frames. Without a
>> packetizer we get a lot of decoding issues.
>>
>> Fixes #18916
>> ---
>>   modules/demux/mkv/matroska_segment_parse.cpp | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
>> index 0b7967d48b..e442d8435f 100644
>> --- a/modules/demux/mkv/matroska_segment_parse.cpp
>> +++ b/modules/demux/mkv/matroska_segment_parse.cpp
>> @@ -1510,6 +1510,8 @@ bool matroska_segment_c::TrackInit( mkv_track_t * p_tk )
>>           }
>>           S_CASE("V_MPEG2") {
>>               vars.p_fmt->i_codec = VLC_CODEC_MPGV;
>> +            if (strstr(vars.obj->psz_muxing_application,"libmakemkv"))
>> +                vars.p_fmt->b_packetized = false;
>>               fill_extra_data( vars.p_tk, 0 );
>>           }
>>           S_CASE("V_THEORA") {
>>
> sample from 18916 behaves now worse with radeon and now crashes my system.
> Unsure if i want to test again with packetizer, but afair, that did only
> remove some artifacts.

It does fix the issue with the Matroska sample. Maybe not for other 
formats where it doesn't go in the packetizer.

> That's trying to work around decoders bugs :/
>

Yes. There's a patch on ffmpeg that's been sitting for 2 months to fix 
the crash. It doesn't even address the internal frame referencing bug 
(hence it's not been pushed).

But it's better than nothing.


More information about the vlc-devel mailing list