Skip to content

Commit f8c386b

Browse files
author
Clement Champetier
committed
StreamTranscoder: remove unused attribute _offsetPassed
1 parent 6e1354d commit f8c386b

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/AvTranscoder/transcoder/StreamTranscoder.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ StreamTranscoder::StreamTranscoder(
3838
, _offset( 0 )
3939
, _canSwitchToGenerator( false )
4040
, _verbose( false )
41-
, _offsetPassed( false )
4241
{
4342
// create a re-wrapping case
4443
switch( _inputStream->getStreamType() )
@@ -84,7 +83,6 @@ StreamTranscoder::StreamTranscoder(
8483
, _offset( offset )
8584
, _canSwitchToGenerator( false )
8685
, _verbose( false )
87-
, _offsetPassed( false )
8886
{
8987
// create a transcode case
9088
switch( _inputStream->getStreamType() )
@@ -183,7 +181,6 @@ StreamTranscoder::StreamTranscoder(
183181
, _offset( 0 )
184182
, _canSwitchToGenerator( false )
185183
, _verbose( false )
186-
, _offsetPassed( false )
187184
{
188185
if( profile.find( constants::avProfileType )->second == constants::avProfileTypeVideo )
189186
{
@@ -330,13 +327,9 @@ bool StreamTranscoder::processTranscode( const int subStreamIndex )
330327
std::cout << "transcode a frame " << std::endl;
331328

332329
// check offset
333-
if( _offset &&
334-
_frameProcessed > _offset &&
335-
! _offsetPassed &&
336-
_canSwitchToGenerator )
330+
if( _offset && _frameProcessed == _offset + 1 )
337331
{
338332
switchToInputDecoder();
339-
_offsetPassed = true;
340333
}
341334

342335
bool decodingStatus = false;

src/AvTranscoder/transcoder/StreamTranscoder.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ class AvExport StreamTranscoder
103103

104104
bool _canSwitchToGenerator; ///< Automatically switch to a generator at the end of the stream
105105
bool _verbose;
106-
bool _offsetPassed; ///< Is the offset at the beginning of the stream is finished.
107106
};
108107

109108
}

0 commit comments

Comments
 (0)