Read bitstream parameters for E-AC-3 streams before returning an error.

Originally committed as revision 14528 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Justin Ruggles 2008-08-03 22:29:06 +00:00
parent 602116df9b
commit 55aff0d901
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}