Skip to content

Commit b72c595

Browse files
author
Clement Champetier
committed
ICodec: setCodec is a private function
Need to create a new codec object if we need to set the codec.
1 parent fcfe878 commit b72c595

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/AvTranscoder/codec/ICodec.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ class AvExport ICodec
3535
OptionMap& getOptionsMap() { return _options; } ///< Get options as map
3636

3737
Option& getOption( const std::string& optionName ) { return _options.at(optionName); }
38-
39-
void setCodec( const ECodecType type, const std::string& codecName );
40-
void setCodec( const ECodecType type, const AVCodecID codecId );
4138

4239
#ifndef SWIG
4340
AVCodecContext& getAVCodecContext() { return *_avCodecContext; }
@@ -47,6 +44,8 @@ class AvExport ICodec
4744
#endif
4845

4946
private:
47+
void setCodec( const ECodecType type, const std::string& codecName );
48+
void setCodec( const ECodecType type, const AVCodecID codecId );
5049
void allocateContext();
5150
void loadCodecOptions();
5251

src/AvTranscoder/essenceStream/AvOutputAudio.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ void AvOutputAudio::setProfile( const ProfileLoader::Profile& profile, const Aud
166166
throw std::runtime_error( "The profile " + profile.find( constants::avProfileIdentificatorHuman )->second + " is invalid." );
167167
}
168168

169-
_codec.setCodec( eCodecTypeEncoder, profile.find( constants::avProfileCodec )->second );
170169
_codec.setAudioParameters( frameDesc );
171170

172171
for( ProfileLoader::Profile::const_iterator it = profile.begin(); it != profile.end(); ++it )

src/AvTranscoder/essenceStream/AvOutputVideo.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ void AvOutputVideo::setProfile( const ProfileLoader::Profile& profile, const avt
153153
{
154154
throw std::runtime_error( "The profile " + profile.find( constants::avProfileIdentificatorHuman )->second + " is invalid." );
155155
}
156-
157-
_codec.setCodec( eCodecTypeEncoder, profile.find( constants::avProfileCodec )->second );
158156

159157
const size_t frameRate = std::strtoul( profile.find( constants::avProfileFrameRate )->second.c_str(), NULL, 0 );
160158
_codec.setTimeBase( 1, frameRate );

0 commit comments

Comments
 (0)