[FFmpeg-cvslog] avcodec/hevc: Silence "warning: ref0/ 1 may be used uninitialized in this function"

Michael Niedermayer git at videolan.org
Thu Dec 11 04:18:03 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Dec 11 02:58:41 2014 +0100| [ef23bd939d955f53bc58696bbb68960784066894] | committer: Michael Niedermayer

avcodec/hevc: Silence "warning: ref0/1 may be used uninitialized in this function"

Also make code more robust by initializing the pointers to NULL

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/hevc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index d4dc52c..9a6d0b3 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -1636,7 +1636,7 @@ static void hls_prediction_unit(HEVCContext *s, int x0, int y0,
 
     MvField *tab_mvf = s->ref->tab_mvf;
     RefPicList  *refPicList = s->ref->refPicList;
-    HEVCFrame *ref0, *ref1;
+    HEVCFrame *ref0 = NULL, *ref1 = NULL;
     uint8_t *dst0 = POS(0, x0, y0);
     uint8_t *dst1 = POS(1, x0, y0);
     uint8_t *dst2 = POS(2, x0, y0);



More information about the ffmpeg-cvslog mailing list