Skip to content

Commit df5231e

Browse files
author
Clement Champetier
committed
StreamTranscoder: clean call of processTranscode
1 parent 8da8549 commit df5231e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/AvTranscoder/transcoder/StreamTranscoder.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,14 +326,8 @@ void StreamTranscoder::preProcessCodecLatency()
326326
bool StreamTranscoder::processFrame()
327327
{
328328
if( isRewrapCase() )
329-
{
330329
return processRewrap();
331-
}
332330

333-
if( _subStreamIndex < 0 )
334-
{
335-
return processTranscode();
336-
}
337331
return processTranscode( _subStreamIndex );
338332
}
339333

@@ -396,7 +390,7 @@ bool StreamTranscoder::processTranscode( const int subStreamIndex )
396390
}
397391

398392
bool decodingStatus = false;
399-
if( subStreamIndex == -1 )
393+
if( subStreamIndex < 0 )
400394
decodingStatus = _currentDecoder->decodeNextFrame( *_sourceBuffer );
401395
else
402396
decodingStatus = _currentDecoder->decodeNextFrame( *_sourceBuffer, subStreamIndex );

src/AvTranscoder/transcoder/StreamTranscoder.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class AvExport StreamTranscoder
112112

113113
ITransform* _transform; ///< Video or audio transform (has ownership)
114114

115-
int _subStreamIndex; ///< Index of channel that is processed from the input stream (-1 if no demultiplexing).
115+
int _subStreamIndex; ///< Index of channel that is processed from the input stream (<0 if no demultiplexing).
116116

117117
double _offset; ///< Offset, in seconds, at the beginning of the StreamTranscoder.
118118

0 commit comments

Comments
 (0)