changeset 4103:4da24acf4e20 libavcodec

avoid random noise on damaged frames
author michael
date Mon, 30 Oct 2006 01:29:56 +0000
parents 8b1819f82c4a
children 04ff8026d9c0
files mpegaudiodec.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudiodec.c	Sun Oct 29 13:14:37 2006 +0000
+++ b/mpegaudiodec.c	Mon Oct 30 01:29:56 2006 +0000
@@ -2269,7 +2269,8 @@
 //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);