mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-21 07:59:43 +08:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user