obs-ffmpeg: Use av_opt_set on context instead of priv_data

Certain ffmpeg parameters such as "bufsize" or "maxrate" have to be
applied to the context rather than to "priv_data". In order to make sure
options are still passed to the encoder setting set AV_OPT_SEARCH_CHILDREN.
This commit is contained in:
derrod
2019-10-09 18:54:01 +02:00
parent cda7f3e3fd
commit 5e6a538931

View File

@@ -183,7 +183,8 @@ static bool parse_params(AVCodecContext *context, char **opts)
*assign = 0;
value = assign + 1;
if (av_opt_set(context->priv_data, name, value, 0)) {
if (av_opt_set(context, name, value,
AV_OPT_SEARCH_CHILDREN)) {
blog(LOG_WARNING, "Failed to set %s=%s", name,
value);
ret = false;