@@ -38,7 +38,6 @@ StreamTranscoder::StreamTranscoder(
38
38
, _offset( 0 )
39
39
, _canSwitchToGenerator( false )
40
40
, _verbose( false )
41
- , _offsetPassed( false )
42
41
{
43
42
// create a re-wrapping case
44
43
switch ( _inputStream->getStreamType () )
@@ -84,7 +83,6 @@ StreamTranscoder::StreamTranscoder(
84
83
, _offset( offset )
85
84
, _canSwitchToGenerator( false )
86
85
, _verbose( false )
87
- , _offsetPassed( false )
88
86
{
89
87
// create a transcode case
90
88
switch ( _inputStream->getStreamType () )
@@ -183,7 +181,6 @@ StreamTranscoder::StreamTranscoder(
183
181
, _offset( 0 )
184
182
, _canSwitchToGenerator( false )
185
183
, _verbose( false )
186
- , _offsetPassed( false )
187
184
{
188
185
if ( profile.find ( constants::avProfileType )->second == constants::avProfileTypeVideo )
189
186
{
@@ -330,13 +327,9 @@ bool StreamTranscoder::processTranscode( const int subStreamIndex )
330
327
std::cout << " transcode a frame " << std::endl;
331
328
332
329
// check offset
333
- if ( _offset &&
334
- _frameProcessed > _offset &&
335
- ! _offsetPassed &&
336
- _canSwitchToGenerator )
330
+ if ( _offset && _frameProcessed == _offset + 1 )
337
331
{
338
332
switchToInputDecoder ();
339
- _offsetPassed = true ;
340
333
}
341
334
342
335
bool decodingStatus = false ;
0 commit comments