ffmpeg | branch: release/2.8 | James Almer <jamr...@gmail.com> | Mon Mar 18 17:25:58 2019 -0300| [88588a24e9153ca2410e970990fa2acacaa8b2cc] | committer: James Almer
avcodec/hevcdec: decode at most one slice reporting being the first in the picture Fixes deadlocks when decoding packets containing more than one of the aforementioned slices when using frame threads. Tested-by: Derek Buitenhuis <derek.buitenh...@gmail.com> Signed-off-by: James Almer <jamr...@gmail.com> (cherry picked from commit 70c8c8a818f39bc262565ec29fae2baffb3e1660) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88588a24e9153ca2410e970990fa2acacaa8b2cc --- libavcodec/hevc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 6dcc1c8aa4..b8b100d353 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2715,6 +2715,10 @@ static int decode_nal_unit(HEVCContext *s, const HEVCNAL *nal) } if (s->sh.first_slice_in_pic_flag) { + if (s->ref) { + av_log(s->avctx, AV_LOG_ERROR, "Two slices reporting being the first in the same frame.\n"); + goto fail; + } ret = hevc_frame_start(s); if (ret < 0) return ret; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog