Skip to content

Commit e623e29

Browse files
author
Clement Champetier
committed
StreamTranscoder: fixed transcode in case of generator
Avoid switching if the current case is a generator.
1 parent 72e6d5b commit e623e29

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/AvTranscoder/transcoder/StreamTranscoder.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,9 @@ bool StreamTranscoder::processTranscode()
526526
bool decodingStatus = true;
527527
for(size_t index = 0; index < _inputDecoders.size(); ++index)
528528
{
529+
if(getProcessCase() == eProcessCaseTranscode)
530+
_currentDecoder = _inputDecoders.at(index);
531+
529532
if(! _inputStreamDesc.empty() && _inputStreamDesc.at(index).demultiplexing())
530533
decodingStatus = decodingStatus && _currentDecoder->decodeNextFrame(*_decodedData.at(index), _inputStreamDesc.at(index)._channelIndexArray);
531534
else

src/AvTranscoder/transcoder/StreamTranscoder.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class AvExport StreamTranscoder
6060
bool processFrame();
6161

6262
//@{
63-
/** Switch decoder */
63+
// Switch current decoder.
6464
void switchToGeneratorDecoder();
6565
void switchToInputDecoder();
6666
//@}

0 commit comments

Comments
 (0)