Commit 31cc9c04 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/h264: Be more strict on rejecting pps_id changes

Fixes race condition
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent dc3c3758
......@@ -1496,8 +1496,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
continue;
again:
if ( !(avctx->active_thread_type & FF_THREAD_FRAME)
|| nals_needed >= nal_index)
if ( (!(avctx->active_thread_type & FF_THREAD_FRAME) || nals_needed >= nal_index)
&& !h->current_slice)
h->au_pps_id = -1;
/* Ignore per frame NAL unit type during extradata
* parsing. Decoding slices is not possible in codec init
......
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