From 8f40ca44ce8d881d0e7dea967583990a084e9bff Mon Sep 17 00:00:00 2001 From: wangqr Date: Thu, 6 Jun 2019 14:31:07 -0400 Subject: [PATCH] Try auto loading audio from video only when actually loading a video If the user drop some files into Aegisub, we try to load sub, video, audio, etc from them. When "Automatically open audio when opening video" is checked in config, we try to load audio from the path of the video. This should only be done if the video is newly loaded. So we should never try to load audio from video if the user is just opening a subtitle. See https://github.com/Aegisub/Aegisub/issues/121#issuecomment-498489847 --- src/project.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/project.cpp b/src/project.cpp index 312f86fe8..b8e9c73b0 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -524,7 +524,7 @@ void Project::LoadList(std::vector const& files) { if (!audio.empty()) DoLoadAudio(audio, false); - else if (OPT_GET("Video/Open Audio")->GetBool() && audio_file != video_file) + else if (!video.empty() && OPT_GET("Video/Open Audio")->GetBool() && audio_file != video_file) DoLoadAudio(video_file, true); if (!subs.empty())