Skip to content

Commit 118d781

Browse files
Merge pull request #1893 from JeromeMartinez/MKV_Date
Matroska: fix date readout if before the millennium
2 parents 31c1619 + 78efa6e commit 118d781

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/MediaInfo/Multiple/File_Mk.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3137,12 +3137,12 @@ void File_Mk::Segment_Info_DateUTC()
31373137
{
31383138
//Parsing
31393139
int64u Data;
3140-
Get_B8(Data, "Data"); Element_Info1(Data/1000000000+978307200); //From Beginning of the millenium, in nanoseconds
3140+
Get_B8(Data, "Data"); Element_Info1((int64s)Data/1000000000+978307200); //From Beginning of the millenium, in nanoseconds
31413141

31423142
FILLING_BEGIN();
31433143
if (Segment_Info_Count>1)
31443144
return; //First element has the priority
3145-
Ztring Time=Ztring().Date_From_Seconds_1970((int32u)(Data/1000000000+978307200)); //978307200s between beginning of the millenium and 1970
3145+
Ztring Time=Ztring().Date_From_Seconds_1970((int32u)((int64s)Data/1000000000+978307200)); //978307200s between beginning of the millenium and 1970
31463146
if (!Time.empty())
31473147
{
31483148
Time.FindAndReplace(__T("UTC "), __T(""));

0 commit comments

Comments
 (0)