Skip to content

Commit cefffd1

Browse files
Adding virtual to give the possibility of overloading OutputFile
1 parent 4c886fd commit cefffd1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/AvTranscoder/OutputFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ OutputFile::OutputFile( const std::string& file )
2727
, filename ( file )
2828
, packetCount ( 0 )
2929
{
30-
av_register_all(); // Warning: should be called only once
3130
}
3231

3332
bool OutputFile::setup()
3433
{
34+
av_register_all();
3535
outputFormat = av_guess_format( NULL, filename.c_str(), NULL);
3636

3737
if( !outputFormat )

src/AvTranscoder/OutputFile.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ class AvExport OutputFile
2323
public:
2424
OutputFile( const std::string& file = "" );
2525

26-
bool setup();
26+
virtual bool setup();
2727

28-
void addVideoStream( const VideoDesc& videoDesc );
29-
void addAudioStream( const AudioDesc& audioDesc );
28+
virtual void addVideoStream( const VideoDesc& videoDesc );
29+
virtual void addAudioStream( const AudioDesc& audioDesc );
3030

31-
bool wrap( const DataStream& data, const size_t streamId );
31+
virtual bool wrap( const DataStream& data, const size_t streamId );
3232

3333
private:
3434
AVOutputFormat* outputFormat;

0 commit comments

Comments
 (0)