From 79a60c8e779242b5ba4c531b2c706c871e8e6420 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 29 Sep 2014 16:16:50 +0000 Subject: hevc_mvs: initialize the temporal MV in case of missing ref The caller expects the MV to always be initialized. --- libavcodec/hevc_mvs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavcodec/hevc_mvs.c') diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c index a611b762f1..8b172a268d 100644 --- a/libavcodec/hevc_mvs.c +++ b/libavcodec/hevc_mvs.c @@ -257,8 +257,10 @@ static int temporal_luma_motion_vector(HEVCContext *s, int x0, int y0, HEVCFrame *ref = s->ref->collocated_ref; - if (!ref) + if (!ref) { + memset(mvLXCol, 0, sizeof(*mvLXCol)); return 0; + } tab_mvf = ref->tab_mvf; colPic = ref->poc; -- cgit v1.2.3