fixes by Gildas Bazin <gbazin at altern dot org>
Originally committed as revision 2745 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7d8379f2b7
commit
2caa92d935
2 changed files with 7 additions and 9 deletions
|
|
@ -1231,6 +1231,7 @@ static int decode_header(MPADecodeContext *s, uint32_t header)
|
|||
int mpa_decode_header(AVCodecContext *avctx, uint32_t head)
|
||||
{
|
||||
MPADecodeContext s1, *s = &s1;
|
||||
memset( s, 0, sizeof(MPADecodeContext) );
|
||||
|
||||
if (check_header(head) != 0)
|
||||
return -1;
|
||||
|
|
@ -1373,6 +1374,10 @@ static int mp_decode_layer2(MPADecodeContext *s)
|
|||
bound = sblimit;
|
||||
|
||||
dprintf("bound=%d sblimit=%d\n", bound, sblimit);
|
||||
|
||||
/* sanity check */
|
||||
if( bound > sblimit ) bound = sblimit;
|
||||
|
||||
/* parse bit allocation */
|
||||
j = 0;
|
||||
for(i=0;i<bound;i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue