We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9595426 commit 8fac8d5Copy full SHA for 8fac8d5
src/AvTranscoder/mediaProperty/VideoProperties.cpp
@@ -397,10 +397,10 @@ size_t VideoProperties::getBitRate() const
397
return _codecContext->bit_rate;
398
399
// else compute bit rate from the first GOP
400
- if( !_formatContext || !_codec )
+ if( ! _formatContext || ! _codec )
401
throw std::runtime_error( "cannot compute bit rate: unknown format or codec context" );
402
403
- if( _codecContext->width && _codecContext->height )
+ if( ! _codecContext->width || ! _codecContext->height )
404
throw std::runtime_error( "cannot compute bit rate: invalid frame size" );
405
406
// discard no frame type when decode
0 commit comments