Skip to content

Commit 7118350

Browse files
author
Clement Champetier
committed
VideoProperties: clean getProfileName()
1 parent 9a4c455 commit 7118350

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/AvTranscoder/mediaProperty/VideoProperties.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ std::string VideoProperties::getProfileName() const
8585
if( _codec->capabilities & CODEC_CAP_TRUNCATED )
8686
_codecContext->flags|= CODEC_FLAG_TRUNCATED;
8787

88-
if( _codecContext->profile != -99 )
89-
{
90-
const char* profile = NULL;
91-
if( ( profile = av_get_profile_name( _codec, _codecContext->profile ) ) == NULL )
92-
throw std::runtime_error( "unknown codec profile" );
88+
if( _codecContext->profile == -99 )
89+
throw std::runtime_error( "unknown codec profile" );
9390

94-
return std::string( profile );
95-
}
91+
const char* profile = NULL;
92+
if( ( profile = av_get_profile_name( _codec, _codecContext->profile ) ) == NULL )
93+
throw std::runtime_error( "unknown codec profile" );
94+
95+
return std::string( profile );
9696
}
9797

9898
std::string VideoProperties::getColorTransfert() const

0 commit comments

Comments
 (0)