Commits

haypo  committed 4e480d1

Metadata MKV: use integer for duration

  • Participants
  • Parent commits a4bc1d2

Comments (0)

Files changed (1)

File hachoir-metadata/hachoir_metadata/video.py

         if "Duration/float" in info \
         and "TimecodeScale/unsigned" in info \
         and 0 < info["Duration/float"].value:
-            self.duration = (info["Duration/float"].value * info["TimecodeScale/unsigned"].value) // 1000000
+            self.duration = int(info["Duration/float"].value) * info["TimecodeScale/unsigned"].value // 1000000
         if "DateUTC/date" in info:
             self.creation_date = info["DateUTC/date"].display
         if "WritingApp/unicode" in info: