No supported encode driver requires the pool to be fixed-size, so just remove this constraint.
Unified · Split
| @@ -1867,9 +1867,6 @@ static av_cold int vaapi_encode_create_recon_frames(AVCodecContext *avctx) · 1866 unmodified lines | |||
| 1867 | ctx->recon_frames->sw_format = recon_format; | 1867 | ctx->recon_frames->sw_format = recon_format; |
| 1868 | ctx->recon_frames->width = ctx->surface_width; | 1868 | ctx->recon_frames->width = ctx->surface_width; |
| 1869 | ctx->recon_frames->height = ctx->surface_height; | 1869 | ctx->recon_frames->height = ctx->surface_height; |
| 1870 | // At most three IDR/I/P frames and two runs of B frames can be in | ||
| 1871 | // flight at any one time. | ||
| 1872 | ctx->recon_frames->initial_pool_size = 3 + 2 * ctx->b_per_p; | ||
| 1873 | 1870 | ||
| 1874 | err = av_hwframe_ctx_init(ctx->recon_frames_ref); | 1871 | err = av_hwframe_ctx_init(ctx->recon_frames_ref); |
| 1875 | if (err < 0) { | 1872 | if (err < 0) { |