]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_hwupload.c
doc/examples/hw_decode: Remove useless NULL check
[ffmpeg] / libavfilter / vf_hwupload.c
index 157686b7b3b81f9b14988b9f83e0158be9b62f95..50bc7e10f6eb9e5455c7c611ef8656d05d84d3c7 100644 (file)
@@ -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;