summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-10-30 01:29:56 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-10-30 01:29:56 +0000
commitc0d8052b501bb07ccc379f0967ffe9bb2c77e606 (patch)
tree45a7de8bf7178931f93f253f47135d41e4274b28
parent5423fe73910dc1dd15ee3ce42e610ea780eb8a24 (diff)
avoid random noise on damaged frames
Originally committed as revision 6836 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegaudiodec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 1ee209507a..7d6087adde 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -2269,7 +2269,8 @@ static int mp_decode_layer3(MPADecodeContext *s)
//av_log(NULL, AV_LOG_ERROR, "backstep:%d, lastbuf:%d\n", main_data_begin, s->last_buf_size);
if(main_data_begin > s->last_buf_size){
av_log(NULL, AV_LOG_ERROR, "backstep:%d, lastbuf:%d\n", main_data_begin, s->last_buf_size);
- s->last_buf_size= main_data_begin;
+// s->last_buf_size= main_data_begin;
+ return -1;
}
memcpy(s->last_buf + s->last_buf_size, ptr, EXTRABYTES);