Merge commit '5b145290df2998a9836a93eb925289c6c8b63af0'

* commit '5b145290df2998a9836a93eb925289c6c8b63af0':
  lavc: Add support for increasing hardware frame pool sizes

Merged-by: Mark Thompson <sw@jkqxz.net>
This commit is contained in:
Mark Thompson
2018-02-12 22:19:38 +00:00
5 changed files with 28 additions and 1 deletions

View File

@@ -1229,6 +1229,15 @@ int avcodec_get_hw_frames_parameters(AVCodecContext *avctx,
ret = hwa->frame_params(avctx, frames_ref);
if (ret >= 0) {
AVHWFramesContext *frames_ctx = (AVHWFramesContext*)frames_ref->data;
if (frames_ctx->initial_pool_size) {
// If the user has requested that extra output surfaces be
// available then add them here.
if (avctx->extra_hw_frames > 0)
frames_ctx->initial_pool_size += avctx->extra_hw_frames;
}
*out_frames_ref = frames_ref;
} else {
av_buffer_unref(&frames_ref);