Skip to content

Commit 67a5472

Browse files
author
Clement Champetier
committed
AvInputStream: refactoring
Use reference instead of pointer in the constructor.
1 parent bc22793 commit 67a5472

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/AvTranscoder/AvInputStream.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ AvInputStream::AvInputStream( )
2929
{
3030
}
3131

32-
AvInputStream::AvInputStream( InputFile* inputFile, const size_t streamIndex )
32+
AvInputStream::AvInputStream( InputFile& inputFile, const size_t streamIndex )
3333
: InputStream( )
34-
, m_inputFile( inputFile )
34+
, m_inputFile( &inputFile )
3535
, m_packetDuration( 0 )
3636
, m_streamIndex( streamIndex )
3737
, m_bufferized( false )

src/AvTranscoder/AvInputStream.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class AvExport AvInputStream : public InputStream
1313
public:
1414
AvInputStream( );
1515

16-
AvInputStream( InputFile* inputFile, const size_t streamIndex );
16+
AvInputStream( InputFile& inputFile, const size_t streamIndex );
1717
~AvInputStream( );
1818

1919
AvInputStream( const AvInputStream& inputStream )

src/AvTranscoder/InputFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ InputFile::InputFile( const std::string& filename )
4949

5050
for( size_t streamIndex = 0; streamIndex < m_formatContext->nb_streams; ++streamIndex )
5151
{
52-
m_inputStreams.push_back( new AvInputStream( this, streamIndex ) );
52+
m_inputStreams.push_back( new AvInputStream( *this, streamIndex ) );
5353
}
5454
}
5555

0 commit comments

Comments
 (0)