[vlc-devel] [PATCH] demux/mkv: fix playback of files with invalid A_AAC/MPEG{2, 3}/ specification

Filip Roséen filip at atch.se
Sat Feb 25 20:44:22 CET 2017


Tracks matching the two introduced statements are invalid, but we still played
them fine prior to the refactoring (perhaps intentionally).

In order to stay somewhat back-compatible with earlier versions the two cases
are now added back (since there are actual files in the wild with the invalid
spec).

refs #4250

--

 - https://trac.videolan.org/vlc/ticket/4250

---
 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 30aa550473..e6debbab43 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1634,6 +1634,8 @@ int32_t matroska_segment_c::TrackInit( mkv_track_t * p_tk )
         S_CASE("A_AAC/MPEG4/LTP")    { A_AAC_MPEG__helper( vars, 3 ); }
         S_CASE("A_AAC/MPEG2/LC/SBR") { A_AAC_MPEG__helper( vars, 1, true ); }
         S_CASE("A_AAC/MPEG4/LC/SBR") { A_AAC_MPEG__helper( vars, 1, true ); }
+        S_CASE("A_AAC/MPEG4/") { A_AAC_MPEG__helper( vars, 3 ); } // see #4250
+        S_CASE("A_AAC/MPEG2/") { A_AAC_MPEG__helper( vars, 3 ); } // backward compatibility
         S_CASE("A_AAC") {
             vars.p_tk->fmt.i_codec = VLC_CODEC_MP4A;
             fill_extra_data( vars.p_tk, 0 );
-- 
2.11.1



More information about the vlc-devel mailing list