summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-11 23:12:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-11 23:14:51 +0100
commitb53adef07b9b3c6f255b43815e26eb21508bacc5 (patch)
treee587223effa20a1234171206a2c1021f878b45e9 /libavcodec/h264.c
parentf8bab2f87ee7ca30095290ed1db62077fb8dd1bd (diff)
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@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index f6cfa1a35d..1197a65a85 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];