diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-09 13:50:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-11 22:01:46 +0200 |
commit | e6d9094fd3c608e2c2f38ae368dc79fa0eda5d6f (patch) | |
tree | 7eb9fd7b2a91147a376a5460acb9180e18e6d9c1 | |
parent | bcc4c360aadff39907b185f9de88fdf9ac91e7cf (diff) | |
download | ffmpeg-e6d9094fd3c608e2c2f38ae368dc79fa0eda5d6f.tar.gz |
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
-rw-r--r-- | libavcodec/h264.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index f2b5a361bc..8268c8716b 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -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; |