In case start_frame() fails, this potentially invalid frame can still be
output to the caller.

Bug-Id: 672; debian/741240; ubuntu/1288206
---
 libavcodec/h264.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 702a272..d8875f5 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1290,6 +1290,8 @@ int ff_h264_frame_start(H264Context *h)
     int i;
     const int pixel_shift = h->pixel_shift;
 
+    h->next_output_pic = NULL;
+
     if (ff_MPV_frame_start(s, s->avctx) < 0)
         return -1;
     ff_er_frame_start(s);
-- 
1.7.10.4

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

Reply via email to