mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-24 20:22:41 +01:00
Fix crash when opening an mp4 video in rare cases - thx jupester :)
Fix #5610 + fix #5545
This commit is contained in:
parent
71a4e132b5
commit
09dc4895c8
@ -20870,13 +20870,14 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
textBoxSource.SelectionLength = 0;
|
||||
|
||||
if (!_loading &&
|
||||
_videoInfo != null &&
|
||||
((decimal)_videoInfo.FramesPerSecond) % 1 != 0m &&
|
||||
Configuration.Settings.General.AutoSetVideoSmpteForTtml &&
|
||||
!Configuration.Settings.General.CurrentVideoIsSmpte &&
|
||||
_subtitle.Header != null &&
|
||||
_subtitle.Header.Contains("frameRateMultiplier=\"1000 1001\"", StringComparison.OrdinalIgnoreCase) &&
|
||||
_subtitle.Header.Contains("timeBase=\"smpte\"", StringComparison.OrdinalIgnoreCase) &&
|
||||
Configuration.Settings.General.AutoSetVideoSmpteForTtml &&
|
||||
!Configuration.Settings.General.CurrentVideoIsSmpte &&
|
||||
_videoInfo != null &&
|
||||
!double.IsNaN(_videoInfo.FramesPerSecond) &&
|
||||
((decimal)_videoInfo.FramesPerSecond) % 1 != 0m &&
|
||||
(_currentSubtitleFormat?.Name == TimedText10.NameOfFormat ||
|
||||
_currentSubtitleFormat?.Name == NetflixTimedText.NameOfFormat ||
|
||||
_currentSubtitleFormat?.Name == ItunesTimedText.NameOfFormat))
|
||||
|
Loading…
Reference in New Issue
Block a user