File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/AvTranscoder/transcoder Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -316,11 +316,8 @@ void Transcoder::process( IProgress& progress )
316
316
if ( ! frameProcessed )
317
317
break ;
318
318
319
- int currentDts = _outputFile.getFormatContext ().streams [0 ]->cur_dts ;
320
- int timebaseNum = _outputFile.getFormatContext ().streams [0 ]->time_base .num ;
321
- int timebaseDen = _outputFile.getFormatContext ().streams [0 ]->time_base .den ;
322
-
323
- double duration = (double )currentDts * timebaseNum / timebaseDen;
319
+ AVStream* firstOutputStream = _outputFile.getFormatContext ().streams [0 ];
320
+ double duration = firstOutputStream->cur_dts * av_q2d ( firstOutputStream->time_base );
324
321
325
322
if ( progress.progress ( duration, totalDuration ) == eJobStatusCancel )
326
323
{
You can’t perform that action at this time.
0 commit comments