Skip to content

Commit 8452145

Browse files
author
Clement Champetier
committed
Video/AudioProperties: fix getFps
1 parent d430fd2 commit 8452145

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/AvTranscoder/mediaProperty/AudioProperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Rational AudioProperties::getTimeBase() const
185185
double AudioProperties::getFps() const
186186
{
187187
Rational timeBase = getTimeBase();
188-
double fps = 1.0 * timeBase.den / ( timeBase.num * getTicksPerFrame() );
188+
double fps = timeBase.den / (double) timeBase.num;
189189
if( isinf( fps ) )
190190
fps = 0.0;
191191
return fps;

src/AvTranscoder/mediaProperty/VideoProperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ int VideoProperties::getLevel() const
471471
double VideoProperties::getFps() const
472472
{
473473
Rational timeBase = getTimeBase();
474-
double fps = 1.0 * timeBase.den / ( timeBase.num * getTicksPerFrame() );
474+
double fps = timeBase.den / (double) timeBase.num;
475475
if( isinf( fps ) )
476476
fps = 0.0;
477477
return fps;

0 commit comments

Comments
 (0)