Commit 1cb5604c authored by bellard's avatar bellard

removed invalid buffer handling


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@604 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 273fb242
...@@ -1133,7 +1133,7 @@ static int decode_header(MPADecodeContext *s, UINT32 header) ...@@ -1133,7 +1133,7 @@ static int decode_header(MPADecodeContext *s, UINT32 header)
} }
s->sample_rate = sample_rate; s->sample_rate = sample_rate;
#ifdef DEBUG #if defined(DEBUG)
printf("layer%d, %d Hz, %d kbits/s, ", printf("layer%d, %d Hz, %d kbits/s, ",
s->layer, s->sample_rate, s->bit_rate); s->layer, s->sample_rate, s->bit_rate);
if (s->nb_channels == 2) { if (s->nb_channels == 2) {
...@@ -2459,8 +2459,6 @@ static int decode_frame(AVCodecContext * avctx, ...@@ -2459,8 +2459,6 @@ static int decode_frame(AVCodecContext * avctx,
len = s->frame_size - len; len = s->frame_size - len;
if (len > buf_size) if (len > buf_size)
len = buf_size; len = buf_size;
else if (len < 4)
len = buf_size > 4 ? 4 : buf_size;
memcpy(s->inbuf_ptr, buf_ptr, len); memcpy(s->inbuf_ptr, buf_ptr, len);
buf_ptr += len; buf_ptr += len;
s->inbuf_ptr += len; s->inbuf_ptr += len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment