mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-19 05:49:09 +02:00
avcodec/h264: Be more tolerant to changing pps id between slices
Fixes Ticket4446 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 98d0c4236c7542c87f012228d3bc88aea67bddc2) Conflicts: libavcodec/h264.c
This commit is contained in:
parent
bcc4c360aa
commit
e6d9094fd3
@ -1499,9 +1499,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 */
|
||||
@ -1552,6 +1549,10 @@ again:
|
||||
hx->intra_gb_ptr =
|
||||
hx->inter_gb_ptr = &hx->gb;
|
||||
|
||||
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(hx, h)))
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user