@@ -355,9 +355,8 @@ void StreamTranscoder::preProcessCodecLatency()
355
355
356
356
bool StreamTranscoder::processFrame ()
357
357
{
358
- const EProcessCase processCase = getProcessCase ();
359
358
std::string msg = " Current process case of the stream is a " ;
360
- switch (processCase )
359
+ switch (getProcessCase () )
361
360
{
362
361
case eProcessCaseTranscode:
363
362
msg += " transcode." ;
@@ -371,9 +370,6 @@ bool StreamTranscoder::processFrame()
371
370
}
372
371
LOG_DEBUG (msg)
373
372
374
- if (processCase == eProcessCaseGenerator)
375
- return processTranscode ();
376
-
377
373
// Manage offset
378
374
if (_offset > 0 )
379
375
{
@@ -382,7 +378,7 @@ bool StreamTranscoder::processFrame()
382
378
{
383
379
LOG_INFO (" End of positive offset" )
384
380
385
- if (getProcessCase () == eProcessCaseTranscode )
381
+ if (_inputDecoder )
386
382
switchToInputDecoder ();
387
383
else
388
384
_currentDecoder = NULL ;
@@ -392,9 +388,7 @@ bool StreamTranscoder::processFrame()
392
388
{
393
389
// process generator
394
390
if (_currentDecoder != _generator)
395
- {
396
391
switchToGeneratorDecoder ();
397
- }
398
392
}
399
393
}
400
394
else if (_offset < 0 )
@@ -405,14 +399,14 @@ bool StreamTranscoder::processFrame()
405
399
{
406
400
LOG_INFO (" End of negative offset" )
407
401
408
- switchToGeneratorDecoder ();
402
+ if (_needToSwitchToGenerator)
403
+ switchToGeneratorDecoder ();
409
404
_offset = 0 ;
410
405
}
411
406
}
412
407
413
- if (processCase == eProcessCaseRewrap)
408
+ if (getProcessCase () == eProcessCaseRewrap)
414
409
return processRewrap ();
415
-
416
410
return processTranscode (_subStreamIndex);
417
411
}
418
412
0 commit comments