From 55aff0d90198b001a580d787464c0c5ffb58506a Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sun, 3 Aug 2008 22:29:06 +0000 Subject: [PATCH] Read bitstream parameters for E-AC-3 streams before returning an error. Originally committed as revision 14528 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/ac3dec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 1f7ca8f..115de60 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -283,9 +283,6 @@ static int parse_frame_header(AC3DecodeContext *s) if(err) return err; - if(hdr.bitstream_id > 10) - return AC3_PARSE_ERROR_BSID; - /* get decoding parameters from header info */ s->bit_alloc_params.sr_code = hdr.sr_code; s->channel_mode = hdr.channel_mode; @@ -310,6 +307,9 @@ static int parse_frame_header(AC3DecodeContext *s) s->channel_in_cpl[s->lfe_ch] = 0; } + if(hdr.bitstream_id > 10) + return AC3_PARSE_ERROR_BSID; + return ac3_parse_header(s); } -- 2.7.4