mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/h264: Fail for invalid mixed IDR / non IDR frames in slice threading mode
Fixes Ticket4408
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fc58d5c43b
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
07a7f38421
commit
7572cf7fdc
|
@ -1551,8 +1551,14 @@ again:
|
|||
ret = -1;
|
||||
goto end;
|
||||
}
|
||||
if(!idr_cleared)
|
||||
if(!idr_cleared) {
|
||||
if (h->current_slice && (avctx->active_thread_type & FF_THREAD_SLICE)) {
|
||||
av_log(h, AV_LOG_ERROR, "invalid mixed IDR / non IDR frames cannot be decoded in slice multithreading mode\n");
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto end;
|
||||
}
|
||||
idr(h); // FIXME ensure we don't lose some frames if there is reordering
|
||||
}
|
||||
idr_cleared = 1;
|
||||
h->has_recovery_point = 1;
|
||||
case NAL_SLICE:
|
||||
|
|
Loading…
Reference in New Issue