1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Only print "invalid new backstep" when it is really invalid.

Fixes issue541.

Originally committed as revision 15339 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-09-16 01:49:32 +00:00
parent 740c14dbd7
commit 1d4113d053

View File

@ -2240,7 +2240,8 @@ static int mp_decode_frame(MPADecodeContext *s,
i= (s->gb.size_in_bits - get_bits_count(&s->gb))>>3; i= (s->gb.size_in_bits - get_bits_count(&s->gb))>>3;
if(i<0 || i > BACKSTEP_SIZE || nb_frames<0){ if(i<0 || i > BACKSTEP_SIZE || nb_frames<0){
av_log(s->avctx, AV_LOG_WARNING, "invalid new backstep %d\n", i); if(i<0)
av_log(s->avctx, AV_LOG_ERROR, "invalid new backstep %d\n", i);
i= FFMIN(BACKSTEP_SIZE, buf_size - HEADER_SIZE); i= FFMIN(BACKSTEP_SIZE, buf_size - HEADER_SIZE);
} }
assert(i <= buf_size - HEADER_SIZE && i>= 0); assert(i <= buf_size - HEADER_SIZE && i>= 0);