Skip to content

Commit 2890f5b

Browse files
author
Clement Champetier
committed
VideoProperties: fixed potential floating point errors when getBitRate
We could analyse first gop and don't retreive the gop size (in case of a decoding error).
1 parent 07a811f commit 2890f5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AvTranscoder/properties/VideoProperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ size_t VideoProperties::getBitRate() const
334334
throw std::runtime_error("cannot compute bit rate: invalid frame size");
335335

336336
// Needed to get the gop size
337-
if(_levelAnalysis < eAnalyseLevelFirstGop)
337+
if(getGopSize() == 0)
338338
throw std::runtime_error("cannot compute bit rate: need to get info from the first gop (see eAnalyseLevelFirstGop)");
339339

340340
// discard no frame type when decode

0 commit comments

Comments
 (0)