Commit 6cad286b authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

MKV: fix playback of AC-3 with bogus default duration

Fixes #8512
The fix is similar to that one in ffmpeg/libav http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/matroskadec.c;#l2813Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 7ad37bba
......@@ -1497,6 +1497,12 @@ int32_t matroska_segment_c::TrackInit( mkv_track_t * p_tk )
}
else if( !strcmp( p_tk->psz_codec, "A_AC3" ) )
{
// the AC-3 default duration cannot be trusted, see #8512
if ( p_tk->fmt.audio.i_rate == 8000 )
{
p_tk->b_no_duration = true;
p_tk->i_default_duration = 0;
}
p_tk->fmt.i_codec = VLC_CODEC_A52;
}
else if( !strcmp( p_tk->psz_codec, "A_EAC3" ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment