aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/svq3.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-06-19 00:10:21 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-06-19 00:10:21 +0000
commit6258c7e6749278cadae7971d1f2c1f340a39a0d4 (patch)
tree92db4a362e8c55245c490207b2e8f010e1a202a7 /libavcodec/svq3.c
parentcfcbbe48b659ff52a6c19a34a6ac44939d617de4 (diff)
downloadffmpeg-6258c7e6749278cadae7971d1f2c1f340a39a0d4.tar.gz
segfault fix
Originally committed as revision 3236 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r--libavcodec/svq3.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index e064626fc1..442839cd17 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -453,8 +453,9 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) {
mb_type = MB_TYPE_SKIP;
} else {
- svq3_mc_dir (h, s->next_picture.mb_type[mb_xy], PREDICT_MODE, 0, 0);
- svq3_mc_dir (h, s->next_picture.mb_type[mb_xy], PREDICT_MODE, 1, 1);
+ mb_type= FFMIN(s->next_picture.mb_type[mb_xy], 0);
+ svq3_mc_dir (h, mb_type, PREDICT_MODE, 0, 0);
+ svq3_mc_dir (h, mb_type, PREDICT_MODE, 1, 1);
mb_type = MB_TYPE_16x16;
}