aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-06 15:01:17 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-17 19:43:18 +0100
commita3dca10470ec4a219974ceb53f2f9a40b87f9267 (patch)
tree28bcdc2f56a59ab7cf09db76e906d2a2355b0570 /libavcodec/h264.c
parenteca1e3dcc8473bc6b51e91d2a80c8bc13fbaa5b3 (diff)
downloadffmpeg-a3dca10470ec4a219974ceb53f2f9a40b87f9267.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>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 885de45687..c1fa344db7 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4945,8 +4945,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