Skip to content

Commit dc660b6

Browse files
author
Clement Champetier
committed
AudioCodec: remove setAudioParameters from sampleRate, channels, and sampleFormat
Only one way so set the video codec: from an audioFrameDesc.
1 parent e83abbd commit dc660b6

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/AvTranscoder/codec/AudioCodec.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,9 @@ AudioFrameDesc AudioCodec::getAudioFrameDesc() const
3030

3131
void AudioCodec::setAudioParameters( const AudioFrameDesc& audioFrameDesc )
3232
{
33-
setAudioParameters( audioFrameDesc.getSampleRate(), audioFrameDesc.getChannels(), audioFrameDesc.getSampleFormat() );
34-
}
35-
36-
void AudioCodec::setAudioParameters( const size_t sampleRate, const size_t channels, const AVSampleFormat sampleFormat )
37-
{
38-
_avCodecContext->sample_rate = sampleRate;
39-
_avCodecContext->channels = channels;
40-
_avCodecContext->sample_fmt = sampleFormat;
33+
_avCodecContext->sample_rate = audioFrameDesc.getSampleRate();
34+
_avCodecContext->channels = audioFrameDesc.getChannels();
35+
_avCodecContext->sample_fmt = audioFrameDesc.getSampleFormat();
4136
}
4237

4338
}

src/AvTranscoder/codec/AudioCodec.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class AvExport AudioCodec : public ICodec
1717
AudioFrameDesc getAudioFrameDesc() const;
1818

1919
void setAudioParameters( const AudioFrameDesc& audioFrameDesc );
20-
void setAudioParameters( const size_t sampleRate, const size_t channels, const AVSampleFormat sampleFormat );
2120
};
2221

2322
}

0 commit comments

Comments
 (0)