[vlc-commits] MKV: fix playback of AC-3 with bogus default duration
Steve Lhomme
git at videolan.org
Tue Feb 24 13:19:00 CET 2015
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Feb 24 12:04:49 2015 +0100| [6cad286bb079a8d6caed5da3c4b2be6dbdfa7f9c] | committer: 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;#l2813
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6cad286bb079a8d6caed5da3c4b2be6dbdfa7f9c
---
modules/demux/mkv/matroska_segment_parse.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 1b07452..d0bd4ed 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -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" ) )
More information about the vlc-commits
mailing list