Browse Source

avoid random noise on damaged frames

Originally committed as revision 6836 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 19 years ago
parent
commit
c0d8052b50
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/mpegaudiodec.c

+ 2
- 1
libavcodec/mpegaudiodec.c View File

@@ -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);


Loading…
Cancel
Save