Skip to content

Commit d8f283c

Browse files
author
Clement Champetier
committed
Transcoder: call processFrame before checking the end of process
* Because in some cases, the duration of input is 0 and we would like to process at least one frame. * Fix #231
1 parent 06ec0b6 commit d8f283c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/AvTranscoder/transcoder/Transcoder.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ ProcessStat Transcoder::process(IProgress& progress)
289289
bool frameProcessed = true;
290290
while(frameProcessed)
291291
{
292+
LOG_DEBUG("Process frame " << frame)
293+
frameProcessed = processFrame();
294+
++frame;
295+
292296
const float progressDuration = getCurrentOutputDuration();
293297

294298
// check if JobStatusCancel
@@ -306,10 +310,6 @@ ProcessStat Transcoder::process(IProgress& progress)
306310
<< progressDuration << "s) is equal or upper than " << expectedOutputDuration << "s.")
307311
break;
308312
}
309-
310-
LOG_DEBUG("Process frame " << frame)
311-
frameProcessed = processFrame();
312-
++frame;
313313
}
314314

315315
_outputFile.endWrap();

0 commit comments

Comments
 (0)