aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h263.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2002-06-06 14:25:44 +0000
committerFabrice Bellard <fabrice@bellard.org>2002-06-06 14:25:44 +0000
commit9f4f81ed1753ceba06f02c1b5fd17ffd124b971d (patch)
tree530bc2443ab24582dbc60064e3775c34014b1f6f /libavcodec/h263.c
parent0f440e02140e9c92c8333fe37b60bca4c397e177 (diff)
downloadffmpeg-9f4f81ed1753ceba06f02c1b5fd17ffd124b971d.tar.gz
fixed case where abs_level > MAX_LEVEL
Originally committed as revision 674 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r--libavcodec/h263.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index c1a6af95d2..decddd344b 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -2956,7 +2956,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
#if 1
{
const int abs_level= ABS(level);
- const int run1= run - rl->max_run[last][abs_level] - 1;
+ int run1;
if(abs_level<=MAX_LEVEL && run<=MAX_RUN && s->error_resilience>=0){
if(abs_level <= rl->max_level[last][run]){
fprintf(stderr, "illegal 3. esc, vlc encoding possible\n");
@@ -2966,6 +2966,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
fprintf(stderr, "illegal 3. esc, esc 1 encoding possible\n");
return DECODING_AC_LOST;
}
+ run1 = run - rl->max_run[last][abs_level] - 1;
if(run1 >= 0 && abs_level <= rl->max_level[last][run1]){
fprintf(stderr, "illegal 3. esc, esc 2 encoding possible\n");
return DECODING_AC_LOST;