File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
src/AvTranscoder/properties Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -475,18 +475,16 @@ float VideoProperties::getDuration() const
475
475
LOG_INFO (" Need a deeper analysis: see eAnalyseLevelFirstGop." )
476
476
return 0 ;
477
477
}
478
- else
478
+
479
+ if (! _nbFrames)
479
480
{
480
- if (! _nbFrames)
481
- {
482
- LOG_INFO (" Estimate the duration from the file size and the bitrate." )
483
- const size_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
+ const size_t bitRate = getBitRate ();
483
+ if (bitRate)
484
+ return _fileProperties->getFileSize () / bitRate * 8 ;
489
485
}
486
+ LOG_INFO (" Get the exact duration from the number of frames and the fps." )
487
+ return _nbFrames / getFps ();
490
488
}
491
489
492
490
bool VideoProperties::hasBFrames () const
You can’t perform that action at this time.
0 commit comments