OSDN Git Service

Fix a crash on oom when decoding hevc.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 31 Oct 2013 19:17:18 +0000 (20:17 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 13 Jan 2014 16:20:19 +0000 (17:20 +0100)
(cherry picked from commit 5ab1efb9d0dc65e748a0291b67915e35578b302e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hevc.c

index 8ff51a3..2b57d13 100644 (file)
@@ -2604,7 +2604,8 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx)
 
     pic_arrays_free(s);
 
-    av_freep(&lc->edge_emu_buffer);
+    if (lc)
+        av_freep(&lc->edge_emu_buffer);
     av_freep(&s->md5_ctx);
 
     for(i=0; i < s->nals_allocated; i++) {