[FFmpeg-cvslog] hevc_mvs: initialize the temporal MV in case of missing ref

Anton Khirnov git at videolan.org
Sat Nov 1 13:21:24 CET 2014


ffmpeg | branch: release/2.4 | Anton Khirnov <anton at khirnov.net> | Mon Sep 29 16:16:50 2014 +0000| [de31f857077a52714f3a2f2e92ac037d42d37769] | committer: Vittorio Giovara

hevc_mvs: initialize the temporal MV in case of missing ref

The caller expects the MV to always be initialized.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de31f857077a52714f3a2f2e92ac037d42d37769
---

 libavcodec/hevc_mvs.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
index a611b76..8b172a2 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;



More information about the ffmpeg-cvslog mailing list