mirror of https://github.com/odrling/Aegisub
Save keyframe and timecode file names even if video isn't loaded
Originally committed to SVN as r6947.
This commit is contained in:
parent
de7dd7e07f
commit
65d3c4cc2d
|
@ -248,12 +248,13 @@ void VideoContext::OnSubtitlesCommit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoContext::OnSubtitlesSave() {
|
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()) {
|
if (!IsLoaded()) {
|
||||||
context->ass->SetScriptInfo("Video File", "");
|
context->ass->SetScriptInfo("Video File", "");
|
||||||
context->ass->SetScriptInfo("Video Aspect Ratio", "");
|
context->ass->SetScriptInfo("Video Aspect Ratio", "");
|
||||||
context->ass->SetScriptInfo("Video Position", "");
|
context->ass->SetScriptInfo("Video Position", "");
|
||||||
context->ass->SetScriptInfo("VFR File", "");
|
|
||||||
context->ass->SetScriptInfo("Keyframes File", "");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,8 +268,6 @@ void VideoContext::OnSubtitlesSave() {
|
||||||
context->ass->SetScriptInfo("YCbCr Matrix", videoProvider->GetColorSpace());
|
context->ass->SetScriptInfo("YCbCr Matrix", videoProvider->GetColorSpace());
|
||||||
context->ass->SetScriptInfo("Video Aspect Ratio", ar);
|
context->ass->SetScriptInfo("Video Aspect Ratio", ar);
|
||||||
context->ass->SetScriptInfo("Video Position", wxString::Format("%d", frame_n));
|
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) {
|
void VideoContext::JumpToFrame(int n) {
|
||||||
|
|
Loading…
Reference in New Issue