mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Refact ChangeFrameRate
This commit is contained in:
parent
ee6bf84cb8
commit
5b2f9fe2aa
@ -299,10 +299,8 @@ namespace Nikse.SubtitleEdit.Core
|
||||
{
|
||||
foreach (Paragraph p in Paragraphs)
|
||||
{
|
||||
double startFrame = p.StartTime.TotalMilliseconds / TimeCode.BaseUnit * oldFrameRate;
|
||||
double endFrame = p.EndTime.TotalMilliseconds / TimeCode.BaseUnit * oldFrameRate;
|
||||
p.StartTime.TotalMilliseconds = startFrame * (TimeCode.BaseUnit / newFrameRate);
|
||||
p.EndTime.TotalMilliseconds = endFrame * (TimeCode.BaseUnit / newFrameRate);
|
||||
p.StartTime.TotalMilliseconds = (p.StartTime.TotalMilliseconds * oldFrameRate / newFrameRate);
|
||||
p.EndTime.TotalMilliseconds = (p.EndTime.TotalMilliseconds * oldFrameRate / newFrameRate);
|
||||
p.CalculateFrameNumbersFromTimeCodes(newFrameRate);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user