mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 06:30:55 +00:00
Allow overriding FFmpeg AVOptions via environment variable
This commit is contained in:
@@ -539,6 +539,16 @@ bool FFmpegVideoDecoder::completeInitialization(const AVCodec* decoder, enum AVP
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString optionVarName = QString("%1_AVOPTIONS").arg(decoder->name).toUpper();
|
||||||
|
QByteArray optionVarValue = qgetenv(optionVarName.toUtf8());
|
||||||
|
if (!optionVarValue.isNull()) {
|
||||||
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
"Applying FFmpeg option overrides for %s: %s",
|
||||||
|
decoder->name,
|
||||||
|
optionVarValue.constData());
|
||||||
|
av_dict_parse_string(&options, optionVarValue, "=", ":", 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Nobody must override our ffGetFormat
|
// Nobody must override our ffGetFormat
|
||||||
SDL_assert(m_VideoDecoderCtx->get_format == ffGetFormat);
|
SDL_assert(m_VideoDecoderCtx->get_format == ffGetFormat);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user