mirror of https://github.com/odrling/Aegisub
avisynth: Validate downmix option
Because... let's maybe not let users make Aegisub call arbitrary symbols in avisynth.dll/so just by editing the config.json.
This commit is contained in:
parent
fe285678a3
commit
ce1b3a0158
|
@ -113,8 +113,9 @@ void AvisynthAudioProvider::LoadFromClip(AVSValue clip) {
|
||||||
AVSValue script;
|
AVSValue script;
|
||||||
|
|
||||||
// Convert to one channel
|
// Convert to one channel
|
||||||
if (OPT_GET("Audio/Downmixer")->GetString() != "None")
|
std::string downmixtype = OPT_GET("Audio/Downmixer")->GetString();
|
||||||
script = env->Invoke(OPT_GET("Audio/Downmixer")->GetString().c_str(), clip);
|
if (downmixtype == "ConvertToMono" || downmixtype == "GetLeftChannel" || downmixtype == "GetRightChannel")
|
||||||
|
script = env->Invoke(downmixtype.c_str(), clip);
|
||||||
else
|
else
|
||||||
script = clip;
|
script = clip;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue