Skip to content

Commit a7aa7a5

Browse files
using variables, not strings
1 parent ab93bdd commit a7aa7a5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/AvTranscoder/OutputStreamVideo.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,19 +181,20 @@ bool OutputStreamVideo::encodeFrame( DataStream& codedFrame )
181181
void OutputStreamVideo::setProfile( const std::string& profile )
182182
{
183183
Profile p;
184+
184185
p.loadProfiles();
185186

186187
Profile::ProfileDesc prof = p.getProfile( profile );
187188

188-
_videoDesc.setVideoCodec( prof["codec"] );
189+
_videoDesc.setVideoCodec( prof[ "codec" ] );
189190
_videoDesc.setTimeBase( 1, 25 ); // 25 fps
190-
_videoDesc.setImageParameters( 1920, 1080, av_get_pix_fmt( prof["pix_fmt"].c_str() ) );
191+
_videoDesc.setImageParameters( 1920, 1080, av_get_pix_fmt( prof[ "pix_fmt" ].c_str() ) );
191192

192193
for( Profile::ProfileDesc::iterator it = prof.begin(); it != prof.end(); ++it )
193194
{
194-
if( (*it).first == "avProfile" )
195+
if( (*it).first == Profile::avProfileIdentificator )
195196
continue;
196-
if( (*it).first == "avProfileLong" )
197+
if( (*it).first == Profile::avProfileIdentificatorHuman )
197198
continue;
198199
if( (*it).first == Profile::avProfileType )
199200
continue;
@@ -220,9 +221,9 @@ void OutputStreamVideo::setProfile( const std::string& profile )
220221

221222
for( Profile::ProfileDesc::iterator it = prof.begin(); it != prof.end(); ++it )
222223
{
223-
if( (*it).first == "avProfile" )
224+
if( (*it).first == Profile::avProfileIdentificator )
224225
continue;
225-
if( (*it).first == "avProfileLong" )
226+
if( (*it).first == Profile::avProfileIdentificatorHuman )
226227
continue;
227228
if( (*it).first == Profile::avProfileType )
228229
continue;
@@ -244,7 +245,6 @@ void OutputStreamVideo::setProfile( const std::string& profile )
244245
std::cout << "2.warning: " << e.what() << std::endl;
245246
}
246247
}
247-
248248
}
249249

250250
}

0 commit comments

Comments
 (0)