From 1458cf69427fc6d5365b84e047a4768bc4306bb3 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sat, 17 Aug 2019 15:47:20 +0100 Subject: [PATCH] Fixes for compilation on Raspbian Buster --- audioomx.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/audioomx.cc b/audioomx.cc index a68296a..b3cf7a9 100644 --- a/audioomx.cc +++ b/audioomx.cc @@ -819,7 +819,11 @@ int AudioOMX::InitDecoderLibAV() return 0; } +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 34, 1) + ac3codec_context_libav->flags |= AV_CODEC_FLAG_TRUNCATED; +#else ac3codec_context_libav->flags |= CODEC_FLAG_TRUNCATED; +#endif #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 64, 101) ac3codec_context_libav->request_channel_layout=2; @@ -840,7 +844,12 @@ int AudioOMX::InitDecoderLibAV() return 0; } +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 34, 1) + aaclatmcodec_context_libav->flags |= AV_CODEC_FLAG_TRUNCATED; +#else aaclatmcodec_context_libav->flags |= CODEC_FLAG_TRUNCATED; +#endif + #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 64, 101) aaclatmcodec_context_libav->request_channel_layout=2; #else @@ -862,7 +871,12 @@ int AudioOMX::InitDecoderLibAV() return 0; } +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 34, 1) + mp23codec_context_libav->flags |= AV_CODEC_FLAG_TRUNCATED; +#else mp23codec_context_libav->flags |= CODEC_FLAG_TRUNCATED; +#endif + #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 64, 101) mp23codec_context_libav->request_channel_layout=2; #else -- 2.39.5