mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
parent
74009da776
commit
0a20cd90b4
@ -9,7 +9,7 @@ namespace Nikse.SubtitleEdit.Core.ContainerFormats.Mp4.Boxes
|
||||
{
|
||||
public Mdhd Mdhd;
|
||||
public Minf Minf;
|
||||
public readonly string HandlerType = null;
|
||||
public readonly string HandlerType;
|
||||
public readonly string HandlerName = string.Empty;
|
||||
|
||||
public bool IsTextSubtitle => HandlerType == "sbtl" || HandlerType == "text";
|
||||
@ -24,6 +24,7 @@ namespace Nikse.SubtitleEdit.Core.ContainerFormats.Mp4.Boxes
|
||||
|
||||
public Mdia(Stream fs, ulong maximumLength)
|
||||
{
|
||||
HandlerType = string.Empty;
|
||||
Position = (ulong)fs.Position;
|
||||
while (fs.Position < (long)maximumLength)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ namespace Nikse.SubtitleEdit.Core.NetflixQualityCheck
|
||||
var m = NumberOneToNine.Match(newText);
|
||||
while (m.Success)
|
||||
{
|
||||
bool ok = newText.Length > m.Index + 1 && !":.".Contains(newText[m.Index + 1].ToString()) || newText.Length <= m.Index + 1;
|
||||
bool ok = newText.Length <= m.Index + 1 || newText.Length > m.Index + 1 && !":.".Contains(newText[m.Index + 1].ToString());
|
||||
if (!ok && newText.Length > m.Index + 1)
|
||||
{
|
||||
var rest = newText.Substring(m.Index + 1);
|
||||
@ -41,7 +41,7 @@ namespace Nikse.SubtitleEdit.Core.NetflixQualityCheck
|
||||
m = NumberTen.Match(newText);
|
||||
while (m.Success)
|
||||
{
|
||||
bool ok = newText.Length > m.Index + 2 && newText[m.Index + 2] != ':' || newText.Length <= m.Index + 2;
|
||||
bool ok = newText.Length <= m.Index + 2 || newText.Length > m.Index + 2 && newText[m.Index + 2] != ':';
|
||||
if (ok && m.Index > 0 && ":.".Contains(newText[m.Index - 1].ToString()))
|
||||
ok = false;
|
||||
if (ok)
|
||||
|
@ -165,7 +165,7 @@
|
||||
this.numericUpDownVideoHeight.Name = "numericUpDownVideoHeight";
|
||||
this.numericUpDownVideoHeight.Size = new System.Drawing.Size(47, 20);
|
||||
this.numericUpDownVideoHeight.TabIndex = 1;
|
||||
this.numericUpDownVideoHeight.ValueChanged += new System.EventHandler(this.numericUpDownVideoHeight_ValueChanged);
|
||||
this.numericUpDownVideoHeight.ValueChanged += new System.EventHandler(this.NumericUpDownVideoWidthOrHeightValueChanged);
|
||||
//
|
||||
// buttonGetResolutionFromVideo
|
||||
//
|
||||
@ -197,7 +197,7 @@
|
||||
this.numericUpDownVideoWidth.Name = "numericUpDownVideoWidth";
|
||||
this.numericUpDownVideoWidth.Size = new System.Drawing.Size(47, 20);
|
||||
this.numericUpDownVideoWidth.TabIndex = 0;
|
||||
this.numericUpDownVideoWidth.ValueChanged += new System.EventHandler(this.numericUpDownVideoWidth_ValueChanged);
|
||||
this.numericUpDownVideoWidth.ValueChanged += new System.EventHandler(this.NumericUpDownVideoWidthOrHeightValueChanged);
|
||||
//
|
||||
// groupBoxOptions
|
||||
//
|
||||
|
@ -677,20 +677,12 @@ namespace Nikse.SubtitleEdit.Forms.Styles
|
||||
_header = sb.ToString().Trim();
|
||||
}
|
||||
|
||||
private void numericUpDownVideoWidth_ValueChanged(object sender, EventArgs e)
|
||||
private void NumericUpDownVideoWidthOrHeightValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdatePropertiesTag("PlayResX", numericUpDownVideoWidth.Value.ToString(CultureInfo.InvariantCulture), numericUpDownVideoWidth.Value == 0);
|
||||
UpdatePropertiesTag("PlayResY", numericUpDownVideoHeight.Value.ToString(CultureInfo.InvariantCulture), numericUpDownVideoHeight.Value == 0);
|
||||
UpdateRawHeader();
|
||||
}
|
||||
|
||||
private void numericUpDownVideoHeight_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdatePropertiesTag("PlayResX", numericUpDownVideoWidth.Value.ToString(CultureInfo.InvariantCulture), numericUpDownVideoWidth.Value == 0);
|
||||
UpdatePropertiesTag("PlayResY", numericUpDownVideoHeight.Value.ToString(CultureInfo.InvariantCulture), numericUpDownVideoHeight.Value == 0);
|
||||
UpdateRawHeader();
|
||||
}
|
||||
|
||||
private void comboBoxCollision_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (comboBoxCollision.SelectedIndex == 0)
|
||||
|
@ -1437,7 +1437,6 @@ namespace Test.Logic.Forms
|
||||
target.Settings.RemoveIfAllUppercase = false;
|
||||
target.Settings.RemoveTextBeforeColon = true;
|
||||
target.Settings.OnlyIfInSeparateLine = false;
|
||||
target.Settings.OnlyIfInSeparateLine = false;
|
||||
target.Settings.ColonSeparateLine = false;
|
||||
target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
|
||||
string text = "- I have a theory, captain--" + Environment.NewLine + "UHURA: Captain Kirk.";
|
||||
|
Loading…
Reference in New Issue
Block a user