Commit b76f6a76 authored by Anton Khirnov's avatar Anton Khirnov

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
parent 3a0d5e20
...@@ -523,6 +523,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size) ...@@ -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)) { if (!(avctx->flags2 & AV_CODEC_FLAG2_CHUNKS)) {
h->current_slice = 0; h->current_slice = 0;
h->field_started = 0;
if (!h->first_field) if (!h->first_field)
h->cur_pic_ptr = NULL; h->cur_pic_ptr = NULL;
ff_h264_sei_uninit(&h->sei); ff_h264_sei_uninit(&h->sei);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment