mirror of https://git.ffmpeg.org/ffmpeg.git
vaapi_encode: Add support for codec-local options
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
6e8f66fc93
commit
69b06ed428
|
@ -905,6 +905,7 @@ av_cold int ff_vaapi_encode_init(AVCodecContext *avctx,
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->codec = type;
|
ctx->codec = type;
|
||||||
|
ctx->codec_options = ctx->codec_options_data;
|
||||||
|
|
||||||
ctx->priv_data = av_mallocz(type->priv_data_size);
|
ctx->priv_data = av_mallocz(type->priv_data_size);
|
||||||
if (!ctx->priv_data) {
|
if (!ctx->priv_data) {
|
||||||
|
|
|
@ -172,6 +172,11 @@ typedef struct VAAPIEncodeContext {
|
||||||
int p_counter;
|
int p_counter;
|
||||||
int end_of_stream;
|
int end_of_stream;
|
||||||
|
|
||||||
|
// Codec-local options are allocated to follow this structure in
|
||||||
|
// memory (in the AVCodec definition, set priv_data_size to
|
||||||
|
// sizeof(VAAPIEncodeContext) + sizeof(VAAPIEncodeFooOptions)).
|
||||||
|
void *codec_options;
|
||||||
|
char codec_options_data[0];
|
||||||
} VAAPIEncodeContext;
|
} VAAPIEncodeContext;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue