mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 05:02:36 +01:00
parent
a108b5448f
commit
e54cba6bc7
@ -440,6 +440,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
private int _mpvSubOldHash = -1;
|
||||
private string _mpvTextFileName;
|
||||
private int _retryCount = 3;
|
||||
|
||||
private void RefreshMpv(LibMpvDynamic mpv, Subtitle subtitle, SubtitleFormat uiFormat)
|
||||
{
|
||||
if (subtitle == null)
|
||||
@ -447,6 +448,14 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
return;
|
||||
}
|
||||
|
||||
var hash = subtitle.GetFastHashCode(null);
|
||||
if (hash == _mpvSubOldHash)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_mpvSubOldHash = hash;
|
||||
|
||||
try
|
||||
{
|
||||
if (SmpteMode)
|
||||
@ -508,11 +517,9 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
}
|
||||
}
|
||||
|
||||
var hash = subtitle.GetFastHashCode(null);
|
||||
if (hash != _mpvSubOldHash || string.IsNullOrEmpty(_mpvTextOld))
|
||||
{
|
||||
text = subtitle.ToText(format);
|
||||
_mpvSubOldHash = hash;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user