aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2002-05-26 14:41:53 +0000
committerFabrice Bellard <fabrice@bellard.org>2002-05-26 14:41:53 +0000
commitfad9f495c07be2d990620f5000de075ba2cf1cbd (patch)
tree805a1b41eca4565188ed8e5bb70ea2b614d18749
parentbbdadbda05a2ade237b70c66db74c41d5a700cb3 (diff)
downloadffmpeg-fad9f495c07be2d990620f5000de075ba2cf1cbd.tar.gz
removed invalid buffer handling
Originally committed as revision 604 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegaudiodec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 37bf1ca469..1405e6e346 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1133,7 +1133,7 @@ static int decode_header(MPADecodeContext *s, UINT32 header)
}
s->sample_rate = sample_rate;
-#ifdef DEBUG
+#if defined(DEBUG)
printf("layer%d, %d Hz, %d kbits/s, ",
s->layer, s->sample_rate, s->bit_rate);
if (s->nb_channels == 2) {
@@ -2459,8 +2459,6 @@ static int decode_frame(AVCodecContext * avctx,
len = s->frame_size - len;
if (len > buf_size)
len = buf_size;
- else if (len < 4)
- len = buf_size > 4 ? 4 : buf_size;
memcpy(s->inbuf_ptr, buf_ptr, len);
buf_ptr += len;
s->inbuf_ptr += len;