1
0
Fork 0

Load audio when video is successfully loaded

Fix bug introduced in 8f40ca44ce
This commit is contained in:
wangqr 2019-06-06 16:32:26 -04:00
parent 592250eeaa
commit 2bbed6c5a0
1 changed files with 7 additions and 5 deletions

View File

@ -505,6 +505,9 @@ void Project::LoadList(std::vector<agi::fs::path> const& files) {
subs.clear();
}
if (!audio.empty())
DoLoadAudio(audio, false);
if (!video.empty() && DoLoadVideo(video)) {
double dar = video_provider->GetDAR();
if (dar > 0)
@ -520,12 +523,11 @@ void Project::LoadList(std::vector<agi::fs::path> const& files) {
LoadTimecodes(timecodes);
if (!keyframes.empty())
LoadKeyframes(keyframes);
}
if (!audio.empty())
DoLoadAudio(audio, false);
else if (!video.empty() && OPT_GET("Video/Open Audio")->GetBool() && audio_file != video_file)
DoLoadAudio(video_file, true);
// Load audio from video
if (audio.empty() && OPT_GET("Video/Open Audio")->GetBool() && audio_file != video_file)
DoLoadAudio(video_file, true);
}
if (!subs.empty())
LoadUnloadFiles(properties);