From fb71d7341a742eadad6b0797b12c2cbb591dae8a Mon Sep 17 00:00:00 2001 From: Sebastian Rachuj Date: Fri, 19 Apr 2013 15:24:52 +0200 Subject: [PATCH] Correct length calculation --- taglib/ebml/matroska/ebmlmatroskaaudio.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taglib/ebml/matroska/ebmlmatroskaaudio.cpp b/taglib/ebml/matroska/ebmlmatroskaaudio.cpp index 3ae8b3d2..3ae9734d 100644 --- a/taglib/ebml/matroska/ebmlmatroskaaudio.cpp +++ b/taglib/ebml/matroska/ebmlmatroskaaudio.cpp @@ -46,7 +46,8 @@ public: if(info && (value = info->getChild(Constants::Duration))) { length = static_cast(value->getAsFloat()); if((value = info->getChild(Constants::TimecodeScale))){ - length /= (value->getAsUnsigned() / 1000);} + length /= (value->getAsUnsigned() * (1 / 1000000000)); + } } info = elem->getChild(Constants::Tracks);