mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
lavc/cuviddec: do not reallocate the fifo unnecessarily
This commit is contained in:
parent
70611d7f3b
commit
de40342c04
@ -1030,13 +1030,7 @@ static void cuvid_flush(AVCodecContext *avctx)
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
av_fifo_freep(&ctx->frame_queue);
|
||||
|
||||
ctx->frame_queue = av_fifo_alloc(ctx->nb_surfaces * sizeof(CuvidParsedFrame));
|
||||
if (!ctx->frame_queue) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Failed to recreate frame queue on flush\n");
|
||||
return;
|
||||
}
|
||||
av_fifo_reset(ctx->frame_queue);
|
||||
|
||||
if (ctx->cudecoder) {
|
||||
ctx->cvdl->cuvidDestroyDecoder(ctx->cudecoder);
|
||||
|
Loading…
x
Reference in New Issue
Block a user