diff options
author | Sean McGovern <gseanmcg@gmail.com> | 2018-01-27 21:19:30 -0500 |
---|---|---|
committer | Sean McGovern <gseanmcg@gmail.com> | 2018-01-30 19:04:07 -0500 |
commit | 5085f25ace1e74846a0de3369bedd0e22d1a1bdc (patch) | |
tree | 80e0989738562c066883f5e188e2a2087fb46bae /libavcodec | |
parent | 6829a079444e10818a847e153121fb458cc5c0a8 (diff) | |
download | ffmpeg-5085f25ace1e74846a0de3369bedd0e22d1a1bdc.tar.gz |
vc1: skip motion compensation when data for last picture is invalid
Bug-Id: 1101
Cc: libav-stable@libav.org
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vc1_mc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c index f4632d6247..18ac47a037 100644 --- a/libavcodec/vc1_mc.c +++ b/libavcodec/vc1_mc.c @@ -689,6 +689,11 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg) if (s->avctx->flags & AV_CODEC_FLAG_GRAY) return; + if (!s->last_picture.f->data[1]) { + av_log(s->avctx, AV_LOG_ERROR, "Bad data in last picture frame.\n"); + return; + } + for (i = 0; i < 4; i++) { int d = i < 2 ? dir: dir2; tx = s->mv[d][i][0]; |