---
This fixes CID 1163846.

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

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 46c172a..add0c4c 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1730,7 +1730,7 @@ out:
 
     if (!(avctx->flags2 & CODEC_FLAG2_CHUNKS) ||
         (h->mb_y >= h->mb_height && h->mb_height)) {
-        if (avctx->flags2 & CODEC_FLAG2_CHUNKS)
+        if ((avctx->flags2 & CODEC_FLAG2_CHUNKS) && h->cur_pic_ptr)
             decode_postinit(h, 1);
 
         ff_h264_field_end(h, &h->slice_ctx[0], 0);
-- 
1.9.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to