@@ -95,7 +95,7 @@ void Option::setFlag( const std::string& flag, const bool enable )
95
95
{
96
96
int64_t optVal;
97
97
int error = av_opt_get_int ( _avContext, getName ().c_str (), AV_OPT_SEARCH_CHILDREN, &optVal );
98
- if ( error != 0 )
98
+ if ( ! error )
99
99
{
100
100
char err[AV_ERROR_MAX_STRING_SIZE];
101
101
av_strerror ( error, err, AV_ERROR_MAX_STRING_SIZE );
@@ -119,7 +119,7 @@ void Option::setFlag( const std::string& flag, const bool enable )
119
119
void Option::setValueBool ( const bool value )
120
120
{
121
121
int error = av_opt_set_int ( _avContext, getName ().c_str (), value, AV_OPT_SEARCH_CHILDREN );
122
- if ( error != 0 )
122
+ if ( ! error )
123
123
{
124
124
char err[AV_ERROR_MAX_STRING_SIZE];
125
125
av_strerror ( error, err, AV_ERROR_MAX_STRING_SIZE );
@@ -130,7 +130,7 @@ void Option::setValueBool( const bool value )
130
130
void Option::setValueInt ( const int value )
131
131
{
132
132
int error = av_opt_set_int ( _avContext, getName ().c_str (), value, AV_OPT_SEARCH_CHILDREN );
133
- if ( error != 0 )
133
+ if ( ! error )
134
134
{
135
135
std::ostringstream os;
136
136
os << value;
@@ -146,7 +146,7 @@ void Option::setValueRatio( const int num, const int den )
146
146
ratio.num = num;
147
147
ratio.den = den;
148
148
int error = av_opt_set_q ( _avContext, getName ().c_str (), ratio, AV_OPT_SEARCH_CHILDREN );
149
- if ( error != 0 )
149
+ if ( ! error )
150
150
{
151
151
std::ostringstream os;
152
152
os << num << " /" << den;
@@ -159,7 +159,7 @@ void Option::setValueRatio( const int num, const int den )
159
159
void Option::setValueDouble ( const double value )
160
160
{
161
161
int error = av_opt_set_double ( _avContext, getName ().c_str (), value, AV_OPT_SEARCH_CHILDREN );
162
- if ( error != 0 )
162
+ if ( ! error )
163
163
{
164
164
std::ostringstream os;
165
165
os << value;
@@ -172,7 +172,7 @@ void Option::setValueDouble( const double value )
172
172
void Option::setValueString ( const std::string& value )
173
173
{
174
174
int error = av_opt_set ( _avContext, getName ().c_str (), value.c_str (), AV_OPT_SEARCH_CHILDREN );
175
- if ( error != 0 )
175
+ if ( ! error )
176
176
{
177
177
char err[AV_ERROR_MAX_STRING_SIZE];
178
178
av_strerror ( error, err, AV_ERROR_MAX_STRING_SIZE );
0 commit comments