]> granicus.if.org Git - taglib/commitdiff
Remove check as condition will always be true (checked in the if condition, above).
authorJeff Mitchell <mitchell@kde.org>
Sat, 23 Dec 2006 01:34:01 +0000 (01:34 +0000)
committerJeff Mitchell <mitchell@kde.org>
Sat, 23 Dec 2006 01:34:01 +0000 (01:34 +0000)
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@615877 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

taglib/mpeg/mpegproperties.cpp

index fced161c05afa912fe606f97cc8d0c7adabc3f37..fb816f8d6f28d93894b28630ac8f3f83abfb55e6 100644 (file)
@@ -213,8 +213,7 @@ void MPEG::Properties::read()
   {
       static const int blockSize[] = { 0, 384, 1152, 1152 };
 
-      double timePerFrame = blockSize[firstHeader.layer()];
-      timePerFrame = firstHeader.sampleRate() > 0 ? timePerFrame / firstHeader.sampleRate() : 0;
+      double timePerFrame = blockSize[firstHeader.layer()] / firstHeader.sampleRate();
       d->length = int(timePerFrame * d->xingHeader->totalFrames());
       d->bitrate = d->length > 0 ? d->xingHeader->totalSize() * 8 / d->length / 1000 : 0;
   }