aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-08-03 22:29:06 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-08-03 22:29:06 +0000
commit55aff0d90198b001a580d787464c0c5ffb58506a (patch)
treea5398adf00f32ba1d2b1f24505dafc956b2b0c5c
parent602116df9b5a5f905b45baa99d4990443ee934c9 (diff)
downloadffmpeg-55aff0d90198b001a580d787464c0c5ffb58506a.tar.gz
Read bitstream parameters for E-AC-3 streams before returning an error.
Originally committed as revision 14528 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ac3dec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 1f7ca8f71c..115de6087f 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);
}