Save keyframe and timecode file names even if video isn't loaded

Originally committed to SVN as r6947.
This commit is contained in:
Thomas Goyne 2012-07-24 02:40:34 +00:00
parent de7dd7e07f
commit 65d3c4cc2d
1 changed files with 3 additions and 4 deletions

View File

@ -248,12 +248,13 @@ void VideoContext::OnSubtitlesCommit() {
}
void VideoContext::OnSubtitlesSave() {
context->ass->SetScriptInfo("VFR File", MakeRelativePath(GetTimecodesName(), context->ass->filename));
context->ass->SetScriptInfo("Keyframes File", MakeRelativePath(GetKeyFramesName(), context->ass->filename));
if (!IsLoaded()) {
context->ass->SetScriptInfo("Video File", "");
context->ass->SetScriptInfo("Video Aspect Ratio", "");
context->ass->SetScriptInfo("Video Position", "");
context->ass->SetScriptInfo("VFR File", "");
context->ass->SetScriptInfo("Keyframes File", "");
return;
}
@ -267,8 +268,6 @@ void VideoContext::OnSubtitlesSave() {
context->ass->SetScriptInfo("YCbCr Matrix", videoProvider->GetColorSpace());
context->ass->SetScriptInfo("Video Aspect Ratio", ar);
context->ass->SetScriptInfo("Video Position", wxString::Format("%d", frame_n));
context->ass->SetScriptInfo("VFR File", MakeRelativePath(GetTimecodesName(), context->ass->filename));
context->ass->SetScriptInfo("Keyframes File", MakeRelativePath(GetKeyFramesName(), context->ass->filename));
}
void VideoContext::JumpToFrame(int n) {