]> git.sesse.net Git - ffmpeg/commitdiff
vaapi_encode: Let the reconstructed frame pool be sized dynamically
authorMark Thompson <sw@jkqxz.net>
Thu, 20 Dec 2018 20:39:57 +0000 (20:39 +0000)
committerMark Thompson <sw@jkqxz.net>
Wed, 23 Jan 2019 23:04:11 +0000 (23:04 +0000)
No supported encode driver requires the pool to be fixed-size, so just
remove this constraint.

libavcodec/vaapi_encode.c

index eec083da4fc47414e9a8ec5fe4c352f065a46fb2..b4e9fadaeee5b99543f278739b610a7d680f9e9e 100644 (file)
@@ -1867,9 +1867,6 @@ static av_cold int vaapi_encode_create_recon_frames(AVCodecContext *avctx)
     ctx->recon_frames->sw_format = recon_format;
     ctx->recon_frames->width     = ctx->surface_width;
     ctx->recon_frames->height    = ctx->surface_height;
-    // At most three IDR/I/P frames and two runs of B frames can be in
-    // flight at any one time.
-    ctx->recon_frames->initial_pool_size = 3 + 2 * ctx->b_per_p;
 
     err = av_hwframe_ctx_init(ctx->recon_frames_ref);
     if (err < 0) {