Skip to content

Commit 0837fbd

Browse files
author
Clement Champetier
committed
OutputStream: rename _duration to _wrappedPacketsDuration
1 parent f26b0e5 commit 0837fbd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/AvTranscoder/stream/OutputStream.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ OutputStream::OutputStream( OutputFile& outputFile, const size_t streamIndex )
1212
, _outputFile( outputFile )
1313
, _outputAVStream( outputFile.getFormatContext().getAVStream( streamIndex ) )
1414
, _streamIndex( streamIndex )
15-
, _duration( 0 )
15+
, _wrappedPacketsDuration( 0 )
1616
{
1717
}
1818

@@ -32,8 +32,8 @@ float OutputStream::getStreamDuration() const
3232
if( ! outputPTS.val )
3333
{
3434
LOG_WARN( "PTS generation when outputting stream " << _streamIndex << " is not set." )
35-
if( _duration )
36-
return av_q2d( _outputAVStream.codec->time_base ) * _duration;
35+
if( _wrappedPacketsDuration )
36+
return av_q2d( _outputAVStream.codec->time_base ) * _wrappedPacketsDuration;
3737
}
3838

3939
#if AVTRANSCODER_FFMPEG_DEPENDENCY && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(55, 40, 100)
@@ -55,7 +55,7 @@ IOutputStream::EWrappingStatus OutputStream::wrap( const CodedData& data )
5555
IOutputStream::EWrappingStatus status = _outputFile.wrap( data, _streamIndex );
5656

5757
// append duration of the packet to the stream
58-
_duration += data.getAVPacket().duration;
58+
_wrappedPacketsDuration += data.getAVPacket().duration;
5959

6060
return status;
6161
}

src/AvTranscoder/stream/OutputStream.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class AvExport OutputStream : public IOutputStream
3232
* It corresponds to the addition of the duration of all packets wrapped by this stream.
3333
* @see getStreamDuration
3434
*/
35-
size_t _duration;
35+
size_t _wrappedPacketsDuration;
3636
};
3737

3838
}

0 commit comments

Comments
 (0)