mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
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.buitenhuis@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 70c8c8a818f39bc262565ec29fae2baffb3e1660)
This commit is contained in:
parent
8abdfe8392
commit
88588a24e9
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user