File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
src/AvTranscoder/mediaProperty Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -351,9 +351,10 @@ Rational VideoProperties::getTimeBase() const
351
351
if ( ! _codecContext )
352
352
throw std::runtime_error ( " unknown codec context" );
353
353
354
- Rational timeBase;
355
- timeBase.num = _codecContext->time_base .num ;
356
- timeBase.den = _codecContext->time_base .den ;
354
+ Rational timeBase = {
355
+ _codecContext->time_base .num ,
356
+ _codecContext->time_base .den ,
357
+ };
357
358
return timeBase;
358
359
}
359
360
@@ -362,9 +363,10 @@ Rational VideoProperties::getSar() const
362
363
if ( ! _codecContext )
363
364
throw std::runtime_error ( " unknown codec context" );
364
365
365
- Rational sar;
366
- sar.num = _codecContext->sample_aspect_ratio .num ;
367
- sar.den = _codecContext->sample_aspect_ratio .den ;
366
+ Rational sar = {
367
+ _codecContext->sample_aspect_ratio .num ,
368
+ _codecContext->sample_aspect_ratio .den ,
369
+ };
368
370
return sar;
369
371
}
370
372
@@ -379,9 +381,10 @@ Rational VideoProperties::getDar() const
379
381
_codecContext->height * getSar ().den ,
380
382
1024 * 1024 );
381
383
382
- Rational dar;
383
- dar.num = darNum;
384
- dar.den = darDen;
384
+ Rational dar = {
385
+ darNum,
386
+ darDen,
387
+ };
385
388
return dar;
386
389
}
387
390
You can’t perform that action at this time.
0 commit comments