Commit b668a1c8 authored by Mark Thompson's avatar Mark Thompson

Merge commit 'c6bc18bc'

* commit 'c6bc18bc':
  vf_hwupload/hwmap: Support setting a fixed pool size
Merged-by: 's avatarMark Thompson <sw@jkqxz.net>
parents 6e050e00 c6bc18bc
......@@ -143,7 +143,9 @@ static int hwmap_config_output(AVFilterLink *outlink)
frames->sw_format = hwfc->sw_format;
frames->width = hwfc->width;
frames->height = hwfc->height;
frames->initial_pool_size = 64;
if (avctx->extra_hw_frames >= 0)
frames->initial_pool_size = 2 + avctx->extra_hw_frames;
err = av_hwframe_ctx_init(ctx->hwframes_ref);
if (err < 0) {
......@@ -223,6 +225,9 @@ static int hwmap_config_output(AVFilterLink *outlink)
hwfc->width = inlink->w;
hwfc->height = inlink->h;
if (avctx->extra_hw_frames >= 0)
hwfc->initial_pool_size = 2 + avctx->extra_hw_frames;
err = av_hwframe_ctx_init(ctx->hwframes_ref);
if (err < 0) {
av_log(avctx, AV_LOG_ERROR, "Failed to create frame "
......
......@@ -131,6 +131,9 @@ static int hwupload_config_output(AVFilterLink *outlink)
ctx->hwframes->width = inlink->w;
ctx->hwframes->height = inlink->h;
if (avctx->extra_hw_frames >= 0)
ctx->hwframes->initial_pool_size = 2 + avctx->extra_hw_frames;
err = av_hwframe_ctx_init(ctx->hwframes_ref);
if (err < 0)
goto fail;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment