@@ -202,27 +202,22 @@ void OutputVideo::setProfile( Profile::ProfileDesc& desc, const avtranscoder::Im
202
202
}
203
203
204
204
_videoDesc.setVideoCodec ( desc[ Profile::avProfileCodec ] );
205
+
205
206
const size_t frameRate = std::strtoul ( desc[ Profile::avProfileFrameRate ].c_str (), NULL , 0 );
206
207
_videoDesc.setTimeBase ( 1 , frameRate );
208
+
207
209
_videoDesc.setImageParameters ( imageDesc );
208
210
209
211
for ( Profile::ProfileDesc::iterator it = desc.begin (); it != desc.end (); ++it )
210
212
{
211
- if ( (*it).first == Profile::avProfileIdentificator )
212
- continue ;
213
- if ( (*it).first == Profile::avProfileIdentificatorHuman )
214
- continue ;
215
- if ( (*it).first == Profile::avProfileType )
216
- continue ;
217
- if ( (*it).first == Profile::avProfileCodec )
218
- continue ;
219
- if ( (*it).first == Profile::avProfilePixelFormat )
220
- continue ;
221
- if ( (*it).first == Profile::avProfileWidth )
222
- continue ;
223
- if ( (*it).first == Profile::avProfileHeight )
224
- continue ;
225
- if ( (*it).first == Profile::avProfileFrameRate )
213
+ if ( (*it).first == Profile::avProfileIdentificator ||
214
+ (*it).first == Profile::avProfileIdentificatorHuman ||
215
+ (*it).first == Profile::avProfileType ||
216
+ (*it).first == Profile::avProfileCodec ||
217
+ (*it).first == Profile::avProfilePixelFormat ||
218
+ (*it).first == Profile::avProfileWidth ||
219
+ (*it).first == Profile::avProfileHeight ||
220
+ (*it).first == Profile::avProfileFrameRate )
226
221
continue ;
227
222
228
223
try
@@ -239,21 +234,14 @@ void OutputVideo::setProfile( Profile::ProfileDesc& desc, const avtranscoder::Im
239
234
240
235
for ( Profile::ProfileDesc::iterator it = desc.begin (); it != desc.end (); ++it )
241
236
{
242
- if ( (*it).first == Profile::avProfileIdentificator )
243
- continue ;
244
- if ( (*it).first == Profile::avProfileIdentificatorHuman )
245
- continue ;
246
- if ( (*it).first == Profile::avProfileType )
247
- continue ;
248
- if ( (*it).first == Profile::avProfileCodec )
249
- continue ;
250
- if ( (*it).first == Profile::avProfilePixelFormat )
251
- continue ;
252
- if ( (*it).first == Profile::avProfileWidth )
253
- continue ;
254
- if ( (*it).first == Profile::avProfileHeight )
255
- continue ;
256
- if ( (*it).first == Profile::avProfileFrameRate )
237
+ if ( (*it).first == Profile::avProfileIdentificator ||
238
+ (*it).first == Profile::avProfileIdentificatorHuman ||
239
+ (*it).first == Profile::avProfileType ||
240
+ (*it).first == Profile::avProfileCodec ||
241
+ (*it).first == Profile::avProfilePixelFormat ||
242
+ (*it).first == Profile::avProfileWidth ||
243
+ (*it).first == Profile::avProfileHeight ||
244
+ (*it).first == Profile::avProfileFrameRate )
257
245
continue ;
258
246
259
247
try
0 commit comments