[FFmpeg-cvslog] h264: reset first_field when current_picture_ptr is reset

Michael Niedermayer git at videolan.org
Fri Jan 11 23:20:00 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 11 23:12:27 2013 +0100| [b53adef07b9b3c6f255b43815e26eb21508bacc5] | committer: Michael Niedermayer

h264: reset first_field when current_picture_ptr is reset

Fixes NULL pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index f6cfa1a..1197a65 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4287,6 +4287,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
  out:
 
         s->current_picture_ptr = NULL;
+        s->first_field = 0;
 
         // FIXME factorize this with the output code below
         out     = h->delayed_pic[0];



More information about the ffmpeg-cvslog mailing list