diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-06 15:01:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-12 17:10:36 +0100 |
commit | eeab3e1b204582b35944bfc3ee1c28b593f083a1 (patch) | |
tree | e3024ec34ea550e7b36b079965985bdc972055c5 | |
parent | a75787a71a4b1991b561de2859705316ec5dca1b (diff) | |
download | ffmpeg-eeab3e1b204582b35944bfc3ee1c28b593f083a1.tar.gz |
avcodec/h264: Be more strict on rejecting pps_id changes
Fixes race condition
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 31cc9c04ca386dce289864021982da62190982ab)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index e5073089d9..438c43f613 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1515,8 +1515,8 @@ 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) + 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 |