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 98d0c4236c
)
Conflicts:
libavcodec/h264.c
(cherry picked from commit 0cd0fa9d0baabd2dc0442ed8b53ba65282733b61)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1516,9 +1516,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
again:
|
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
|
/* Ignore per frame NAL unit type during extradata
|
||||||
* parsing. Decoding slices is not possible in codec init
|
* parsing. Decoding slices is not possible in codec init
|
||||||
* with frame-mt */
|
* with frame-mt */
|
||||||
@@ -1570,6 +1567,10 @@ again:
|
|||||||
hx->inter_gb_ptr = &hx->gb;
|
hx->inter_gb_ptr = &hx->gb;
|
||||||
hx->data_partitioning = 0;
|
hx->data_partitioning = 0;
|
||||||
|
|
||||||
|
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)))
|
if ((err = ff_h264_decode_slice_header(hx, h)))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user