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>
This commit is contained in:
Michael Niedermayer 2013-01-11 23:12:27 +01:00
parent f8bab2f87e
commit b53adef07b

View File

@ -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];