Skip to content

Commit 2656857

Browse files
include header and fix LibAV build
1 parent 6c64e05 commit 2656857

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/AvTranscoder/Metadatas/AudioStreamProperties.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ extern "C" {
99
#include <libavformat/avformat.h>
1010
#include <libavutil/avutil.h>
1111
#include <libavutil/pixdesc.h>
12+
#include <libavutil/channel_layout.h>
1213
}
1314

1415
namespace avtranscoder
@@ -38,12 +39,14 @@ AudioProperties audioStreamInfo( const AVFormatContext* formatContext, const siz
3839
ap.channelLayout = std::string( buf1 );
3940

4041
const char* channelName = av_get_channel_name( codec_context->channel_layout );
41-
const char* channelDescription = av_get_channel_description( codec_context->channel_layout );
4242
if( channelName )
4343
ap.channelName = std::string( channelName );
44+
#ifdef FF_RESAMPLE_LIBRARY
45+
const char* channelDescription = av_get_channel_description( codec_context->channel_layout );
4446
if( channelDescription )
4547
ap.channelDescription = std::string( channelDescription );
46-
48+
#endif
49+
4750
std::string sampleFormat = "";
4851
switch( codec_context->sample_fmt )
4952
{

0 commit comments

Comments
 (0)