Skip to content

Commit

Permalink
修改视频时间太长出错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwang2006 committed Apr 8, 2022
1 parent d8811be commit ff7347a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions uFrmBcut2Strt.pas
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ procedure TFrmBcut2Strt.FormCreate(Sender: TObject);

procedure _BcutToSrt(const AFileName: string; List: TStrings);

function inPointToStr(inPoint: Integer): string;
function inPointToStr(inPoint: Int64): string;
var
h, m, s, ms: Integer;
begin
Expand All @@ -115,7 +115,8 @@ procedure _BcutToSrt(const AFileName: string; List: TStrings);
AXmlDoc: IXMLDocument;
videoTrack, videoTracks, trackCaptions, caption: IXMLNode;
NodeList: IXMLNodeList;
I, J, inPoint, duration: Integer;
I, J: Integer;
inPoint, duration: Int64;
sText: string;
bFound: Boolean;
begin
Expand Down Expand Up @@ -146,9 +147,8 @@ procedure _BcutToSrt(const AFileName: string; List: TStrings);
begin
caption := NodeList.Get(J);
sText := caption.Attributes['text'];
inPoint := caption.Attributes['inPoint'];
duration := caption.Attributes['duration'];

inPoint := StrToInt64(VarToStr(caption.Attributes['inPoint']));
duration := StrToInt64(VarToStr(caption.Attributes['duration']));
List.Add(IntToStr(j + 1));
List.Add(inPointToStr(inPoint) + ' --> ' + inPointToStr(inPoint + duration));
List.Add(sText);
Expand Down

0 comments on commit ff7347a

Please sign in to comment.