From 224481317733aa63d8924d640d5c786bb0372ca8 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 29 Oct 2017 16:06:10 +0000 Subject: [PATCH] Compile fixes for stretch --- GNUmakefile | 4 ++-- audioomx.cc | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 55d7829..0682e5d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -35,8 +35,8 @@ LD=arm-linux-gnueabi-g++-4.7 endif -CXXFLAGS_DEV = -g -O0 -Wall -Wshadow -DDEV -D_GNU_SOURCE $(INCLUDES) $(vomp_options) -CXXFLAGS_REL = -O3 -Wall -Wshadow -D_GNU_SOURCE $(INCLUDES) $(vomp_options) +CXXFLAGS_DEV = -g -O0 -Wall -Wshadow -Wno-psabi -DDEV -D_GNU_SOURCE $(INCLUDES) $(vomp_options) +CXXFLAGS_REL = -O3 -Wall -Wshadow -Wno-psabi -D_GNU_SOURCE $(INCLUDES) $(vomp_options) LIBPATHS = diff --git a/audioomx.cc b/audioomx.cc index 048ffb0..e7980e2 100644 --- a/audioomx.cc +++ b/audioomx.cc @@ -820,7 +820,12 @@ int AudioOMX::InitDecoderLibAV() } ac3codec_context_libav->flags |= CODEC_FLAG_TRUNCATED; + +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 64, 101) + ac3codec_context_libav->request_channel_layout=2; +#else ac3codec_context_libav->request_channels=2; +#endif int avc_ret = avcodec_open2(ac3codec_context_libav, ac3codec_libav, NULL); if (avc_ret < 0) { @@ -836,7 +841,11 @@ int AudioOMX::InitDecoderLibAV() } aaclatmcodec_context_libav->flags |= CODEC_FLAG_TRUNCATED; +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 64, 101) + aaclatmcodec_context_libav->request_channel_layout=2; +#else aaclatmcodec_context_libav->request_channels=2; +#endif avc_ret = avcodec_open2(aaclatmcodec_context_libav, aaclatmcodec_libav, NULL); if (avc_ret < 0) { @@ -854,7 +863,11 @@ int AudioOMX::InitDecoderLibAV() } mp23codec_context_libav->flags |= CODEC_FLAG_TRUNCATED; +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 64, 101) + mp23codec_context_libav->request_channel_layout=2; +#else mp23codec_context_libav->request_channels=2; +#endif avc_ret = avcodec_open2(mp23codec_context_libav, mp23codec_libav, NULL); if (avc_ret < 0) { @@ -881,7 +894,11 @@ int AudioOMX::InitDecoderLibAV() av_init_packet(&incoming_paket_libav); +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 64, 101) + decode_frame_libav=av_frame_alloc(); +#else decode_frame_libav=avcodec_alloc_frame(); +#endif libav_mutex.Unlock(); decompress_buffer_filled=0; -- 2.39.5