[vlc-commits] demux: mkv: fix A_Quicktime/* audio

Francois Cartegnie git at videolan.org
Wed Aug 3 14:49:39 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Aug  3 14:48:04 2016 +0200| [2922a6c0732f842c6df97b6d8ea67ecb64acc9d6] | committer: Francois Cartegnie

demux: mkv: fix A_Quicktime/* audio

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2922a6c0732f842c6df97b6d8ea67ecb64acc9d6
---

 modules/demux/mkv/matroska_segment_parse.cpp | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index ada7e03..c0ee772 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1713,13 +1713,11 @@ int32_t matroska_segment_c::TrackInit( mkv_track_t * p_tk )
             fill_extra_data( vars.p_tk, 0 );
         }
         S_CASE_GLOB("A_QUICKTIME/*") {
-            vars.p_fmt->i_cat = AUDIO_ES;
-
-            if (vars.p_tk->i_extra_data < 8)
-                throw std::runtime_error ("vars.p_tk->i_extra_data < 8 when handling A_QUICKTIME/*");
+            if (vars.p_tk->i_extra_data < 4)
+                throw std::runtime_error ("invalid extradata when handling A_QUICKTIME/*");
 
-            uint8_t const * p = vars.p_tk->p_extra_data;
-            vars.p_fmt->i_codec = VLC_FOURCC(p[4],p[5],p[6],p[7]);
+            vars.p_fmt->i_cat = AUDIO_ES;
+            vars.p_fmt->i_codec = GetFOURCC(vars.p_tk->p_extra_data);
 
             fill_extra_data( vars.p_tk, 0 );
         }



More information about the vlc-commits mailing list