summaryrefslogtreecommitdiff
path: root/libavcodec/eacmv.c
diff options
context:
space:
mode:
authorDaniel Kang <daniel.d.kang@gmail.com>2011-01-09 08:28:40 +0000
committerPeter Ross <pross@xvid.org>2011-01-09 08:28:40 +0000
commit062421e30d1142729e0fddb0d2d488b0ad699471 (patch)
tree5bfe323f6b48066e13abf19897d8158bb76316ac /libavcodec/eacmv.c
parent5a477e59607fcb3e64c9d678762d406c70bbdbdd (diff)
eacmv: ensure second-last frame is allocated before referencing it
Fixes issue2513 Original patch by Daniel Kang, daniel.d.kang at gmail Originally committed as revision 26279 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/eacmv.c')
-rw-r--r--libavcodec/eacmv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c
index f506f7cc3e..016b234243 100644
--- a/libavcodec/eacmv.c
+++ b/libavcodec/eacmv.c
@@ -97,6 +97,7 @@ static void cmv_decode_inter(CmvContext * s, const uint8_t *buf, const uint8_t *
}else if(raw<buf_end) { /* inter using second-last frame as reference */
int xoffset = (*raw & 0xF) - 7;
int yoffset = ((*raw >> 4)) - 7;
+ if (s->last2_frame.data[0])
cmv_motcomp(s->frame.data[0], s->frame.linesize[0],
s->last2_frame.data[0], s->last2_frame.linesize[0],
x*4, y*4, xoffset, yoffset, s->avctx->width, s->avctx->height);