Skip to content

Commit 6c64e05

Browse files
update to remove deprecated methods
1 parent 2ab2d4b commit 6c64e05

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/AvTranscoder/DatasStructures/AudioDesc.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void AudioDesc::set( const std::string& key, const std::string& value )
188188
std::string AudioDesc::getAudioCodec() const
189189
{
190190
assert( m_codecContext != NULL );
191-
return m_codecContext->codec_name;
191+
return avcodec_descriptor_get( m_codecContext->codec_id )->name;
192192
}
193193

194194
AVCodecID AudioDesc::getAudioCodecId() const
@@ -197,7 +197,6 @@ AVCodecID AudioDesc::getAudioCodecId() const
197197
return m_codecContext->codec_id;
198198
}
199199

200-
201200
const size_t AudioDesc::getSampleRate() const
202201
{
203202
assert( m_codecContext != NULL );

src/AvTranscoder/DatasStructures/VideoDesc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void VideoDesc::setTimeBase( const size_t num, const size_t den, const size_t ti
7878
std::string VideoDesc::getVideoCodec() const
7979
{
8080
assert( m_codecContext != NULL );
81-
return m_codecContext->codec_name;
81+
return avcodec_descriptor_get( m_codecContext->codec_id )->name;
8282
}
8383

8484
AVCodecID VideoDesc::getVideoCodecId() const

0 commit comments

Comments
 (0)