summaryrefslogtreecommitdiff
path: root/libavcodec/h264dec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-12-28 11:05:25 +0100
committerAnton Khirnov <anton@khirnov.net>2017-03-12 20:42:12 +0100
commitb76f6a76c6312dc551d7c37c6ded36bea7973c74 (patch)
tree347ab13b64e89d8efdcbb87fde2cd175ac3eeaf8 /libavcodec/h264dec.c
parent3a0d5e206d24d41d87a25ba16a79b2ea04c39d4c (diff)
h264dec: initialize field_started to 0 on each decode call
It might be incorrectly set to 1 if the previous call exited with an error. Bug-Id: 1019 CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/h264dec.c')
-rw-r--r--libavcodec/h264dec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 6d7aa7b53c..2a532a7ef7 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -523,6 +523,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)) {
h->current_slice = 0;
+ h->field_started = 0;
if (!h->first_field)
h->cur_pic_ptr = NULL;
ff_h264_sei_uninit(&h->sei);