Skip to content

Commit 0f7508f

Browse files
author
Clement Champetier
committed
VideoProperties: refactor how to getNbFrames
Else statement was not necessary!
1 parent a61d95f commit 0f7508f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/AvTranscoder/properties/VideoProperties.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,14 @@ size_t VideoProperties::getNbFrames() const
392392
LOG_INFO("Need a deeper analysis: see eAnalyseLevelFirstGop.")
393393
return 0;
394394
}
395-
else
395+
396+
if(! _nbFrames)
396397
{
397-
if(! _nbFrames)
398-
{
399-
LOG_INFO("Estimate the number of frames from the fps and the duration.")
400-
return getFps() * getDuration();
401-
}
402-
LOG_INFO("Get the exact number of frames.")
403-
return _nbFrames;
398+
LOG_INFO("Estimate the number of frames from the fps and the duration.")
399+
return getFps() * getDuration();
404400
}
401+
LOG_INFO("Get the exact number of frames.")
402+
return _nbFrames;
405403
}
406404

407405
size_t VideoProperties::getTicksPerFrame() const

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy