Skip to content

Commit 482f304

Browse files
author
Clement Champetier
committed
AudioFrameDesc: add setSampleFormat from name
1 parent 49ef87b commit 482f304

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/AvTranscoder/EssenceStructures/AudioFrame.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class AvExport AudioFrameDesc
2121
void setSampleRate ( const size_t sampleRate ){ m_sampleRate = sampleRate; }
2222
void setChannels ( const size_t channels ){ m_channels = channels; }
2323
void setFps ( const size_t fps ){ m_fps = fps; }
24+
void setSampleFormat( const std::string& sampleFormatName ){ m_sampleFormat = av_get_sample_fmt( sampleFormatName.c_str() ); }
2425
void setSampleFormat( const AVSampleFormat sampleFormat ){ m_sampleFormat = sampleFormat; }
2526

2627
size_t getDataSize() const

0 commit comments

Comments
 (0)