diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-10-08 23:40:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-04 01:00:38 +0100 |
commit | 7b3c851526740cb77fe5af0e48c50b7ead1e0143 (patch) | |
tree | 7b86d23b9cf15d30902481cfb9a25d59790561d4 | |
parent | 1b6e6439faafb8de96ce01f008918ea36eaff8c2 (diff) | |
download | ffmpeg-7b3c851526740cb77fe5af0e48c50b7ead1e0143.tar.gz |
eamad: avoid NULL derefence when missing the reference frame.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6e20554a6d33e92b81dc3cfed6082e03bff2a7f8)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/eamad.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index ee8158174a..f5b25354f1 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -205,7 +205,8 @@ static void decode_mb(MadContext *t, int inter) for (j=0; j<6; j++) { if (mv_map & (1<<j)) { // mv_x and mv_y are guarded by mv_map int add = 2*decode_motion(&s->gb); - comp_block(t, s->mb_x, s->mb_y, j, mv_x, mv_y, add); + if (t->last_frame.data[0]) + comp_block(t, s->mb_x, s->mb_y, j, mv_x, mv_y, add); } else { s->dsp.clear_block(t->block); decode_block_intra(t, t->block); |