Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita61d95f

Browse files
author
Clement Champetier
committed
VideoProperties: refactor how to getDuration
Else statement was not necessary!
1 parentad44be7 commita61d95f

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

‎src/AvTranscoder/properties/VideoProperties.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -475,18 +475,16 @@ float VideoProperties::getDuration() const
475475
LOG_INFO("Need a deeper analysis: see eAnalyseLevelFirstGop.")
476476
return0;
477477
}
478-
else
478+
479+
if(! _nbFrames)
479480
{
480-
if(! _nbFrames)
481-
{
482-
LOG_INFO("Estimate the duration from the file size and the bitrate.")
483-
constsize_t bitRate =getBitRate();
484-
if(bitRate)
485-
return _fileProperties->getFileSize() / bitRate *8;
486-
}
487-
LOG_INFO("Get the exact duration from the number of frames and the fps.")
488-
return _nbFrames /getFps();
481+
LOG_INFO("Estimate the duration from the file size and the bitrate.")
482+
constsize_t bitRate =getBitRate();
483+
if(bitRate)
484+
return _fileProperties->getFileSize() / bitRate *8;
489485
}
486+
LOG_INFO("Get the exact duration from the number of frames and the fps.")
487+
return _nbFrames /getFps();
490488
}
491489

492490
boolVideoProperties::hasBFrames()const

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp