mirror of https://github.com/odrling/Aegisub
Don't modify the "YCbCr Matrix" header when dummy video is opened
Color matching to dummy video makes zero sense, and setting it to None results in breakage when someone opens dummy video for an already typeset script. Closes #1690.
This commit is contained in:
parent
cf79e521e4
commit
1c07f92d02
|
@ -253,7 +253,9 @@ void VideoContext::OnSubtitlesSave() {
|
|||
ar = std::to_string((int)ar_type);
|
||||
|
||||
context->ass->SetScriptInfo("Video File", config::path->MakeRelative(video_filename, "?script").generic_string());
|
||||
context->ass->SetScriptInfo("YCbCr Matrix", video_provider->GetColorSpace());
|
||||
auto matrix = video_provider->GetColorSpace();
|
||||
if (!matrix.empty())
|
||||
context->ass->SetScriptInfo("YCbCr Matrix", matrix);
|
||||
context->ass->SaveUIState("Video Aspect Ratio", ar);
|
||||
context->ass->SaveUIState("Video Position", std::to_string(frame_n));
|
||||
}
|
||||
|
|
|
@ -86,6 +86,6 @@ public:
|
|||
double GetDAR() const override { return 0; }
|
||||
agi::vfr::Framerate GetFPS() const override { return fps; }
|
||||
std::vector<int> GetKeyFrames() const override { return {}; }
|
||||
std::string GetColorSpace() const override { return "None"; }
|
||||
std::string GetColorSpace() const override { return ""; }
|
||||
std::string GetDecoderName() const override { return "Dummy Video Provider"; }
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue