From 5b145290df2998a9836a93eb925289c6c8b63af0 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Mon, 29 Jan 2018 22:18:00 +0000 Subject: lavc: Add support for increasing hardware frame pool sizes AVCodecContext.extra_hw_frames is added to the size of hardware frame pools created by libavcodec for APIs which require fixed-size pools. This allows the user to keep references to a greater number of frames after decode, which may be necessary for some use-cases. It is also added to the initial_pool_size value returned by avcodec_get_hw_frames_parameters() if a fixed-size pool is required. --- libavcodec/options_table.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libavcodec/options_table.h') diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 925ef376f3..4b0a8344d0 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -419,6 +419,7 @@ static const AVOption avcodec_options[] = { {"side_data_only_packets", NULL, OFFSET(side_data_only_packets), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, A|V|E }, #endif {"apply_cropping", NULL, OFFSET(apply_cropping), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, V | D }, +{"extra_hw_frames", "Number of extra hardware frames to allocate for the user", OFFSET(extra_hw_frames), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, V|D }, {NULL}, }; -- cgit v1.2.3