indeo5: fix null pointer crash with ref_mb
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 28 Dec 2011 18:50:29 +0000 (19:50 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jan 2012 21:38:35 +0000 (22:38 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4b35ee0b7c0c4cbac3541a25a5e8c00b657c8f95)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ivi_common.c

index f240845..f66053b 100644 (file)
@@ -506,7 +506,7 @@ void ff_ivi_process_empty_tile(AVCodecContext *avctx, IVIBandDesc *band,
             if (band->inherit_qdelta && ref_mb)
                 mb->q_delta = ref_mb->q_delta;
 
-            if (band->inherit_mv) {
+            if (band->inherit_mv && ref_mb) {
                 /* motion vector inheritance */
                 if (mv_scale) {
                     mb->mv_x = ivi_scale_mv(ref_mb->mv_x, mv_scale);