Skip to content

Commit 8fac8d5

Browse files
committed
VideoProperties: minor fix into getBitRate
1 parent 9595426 commit 8fac8d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AvTranscoder/mediaProperty/VideoProperties.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,10 @@ size_t VideoProperties::getBitRate() const
397397
return _codecContext->bit_rate;
398398

399399
// else compute bit rate from the first GOP
400-
if( !_formatContext || !_codec )
400+
if( ! _formatContext || ! _codec )
401401
throw std::runtime_error( "cannot compute bit rate: unknown format or codec context" );
402402

403-
if( _codecContext->width && _codecContext->height )
403+
if( ! _codecContext->width || ! _codecContext->height )
404404
throw std::runtime_error( "cannot compute bit rate: invalid frame size" );
405405

406406
// discard no frame type when decode

0 commit comments

Comments
 (0)