Merge pull request #1614 from ivandrofly/patch-33

Minor fix/Update
This commit is contained in:
Nikolaj Olsson 2016-04-29 11:08:38 +02:00
commit 51d89bbdd6
2 changed files with 6 additions and 6 deletions

View File

@ -404,7 +404,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
protected TimeCode DecodeTimeCodeFramesTwoParts(string[] parts)
{
if (parts == null)
return new TimeCode(0, 0, 0, 0);
return new TimeCode(0);
if (parts.Length != 2)
throw new InvalidOperationException();
// 00:00
@ -414,7 +414,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
protected TimeCode DecodeTimeCodeFramesThreeParts(string[] parts)
{
if (parts == null)
return new TimeCode(0, 0, 0, 0);
return new TimeCode(0);
if (parts.Length != 3)
throw new InvalidOperationException();
// 00:00:00
@ -424,7 +424,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
protected TimeCode DecodeTimeCodeFramesFourParts(string[] parts)
{
if (parts == null)
return new TimeCode(0, 0, 0, 0);
return new TimeCode(0);
if (parts.Length != 4)
throw new InvalidOperationException();
// 00:00:00:00

View File

@ -206,7 +206,7 @@ namespace Nikse.SubtitleEdit.Core.VobSub
public static bool IsMpeg2PackHeader(byte[] buffer)
{
return buffer.Length >= 3 &&
return buffer.Length >= 4 &&
buffer[0] == 0 &&
buffer[1] == 0 &&
buffer[2] == 1 &&
@ -215,7 +215,7 @@ namespace Nikse.SubtitleEdit.Core.VobSub
public static bool IsPrivateStream1(byte[] buffer, int index)
{
return buffer.Length >= index + 3 &&
return buffer.Length >= index + 4 &&
buffer[index + 0] == 0 &&
buffer[index + 1] == 0 &&
buffer[index + 2] == 1 &&
@ -224,7 +224,7 @@ namespace Nikse.SubtitleEdit.Core.VobSub
public static bool IsPrivateStream2(byte[] buffer, int index)
{
return buffer.Length >= index + 3 &&
return buffer.Length >= index + 4 &&
buffer[index + 0] == 0 &&
buffer[index + 1] == 0 &&
buffer[index + 2] == 1 &&