Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-09 14:50:07 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-04-09 14:50:07 +0300
commit98d0c4236c7542c87f012228d3bc88aea67bddc2 (patch)
tree1de7672d09633fc170b435828b1b6f5ee05766a4 /libavcodec
parent0773f6739538db9cbe2712bfffd4de47639a685e (diff)
avcodec/h264: Be more tolerant to changing pps id between slices
Fixes Ticket4446 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index b4c4cd96c9..639761f07a 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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;