[FFmpeg-cvslog] avcodec/h264: Be more strict on rejecting pps_id changes

Michael Niedermayer git at videolan.org
Fri Feb 6 15:36:46 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Feb  6 15:01:17 2015 +0100| [31cc9c04ca386dce289864021982da62190982ab] | committer: Michael Niedermayer

avcodec/h264: Be more strict on rejecting pps_id changes

Fixes race condition
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=31cc9c04ca386dce289864021982da62190982ab
---

 libavcodec/h264.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 4b01dcc..f8f99e2 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1496,8 +1496,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



More information about the ffmpeg-cvslog mailing list