Commit 98d0c423 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/h264: Be more tolerant to changing pps id between slices

Fixes Ticket4446
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0773f673
......@@ -1495,9 +1495,6 @@ 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)
&& !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
* with frame-mt */
......@@ -1546,6 +1543,10 @@ again:
case NAL_SLICE:
init_get_bits(&sl->gb, ptr, bit_length);
if ( nals_needed >= nal_index
|| (!(avctx->active_thread_type & FF_THREAD_FRAME) && !context_count))
h->au_pps_id = -1;
if ((err = ff_h264_decode_slice_header(h, sl)))
break;
......
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