From f04e9311ab4f05ed86b2e2a6abceb03d87be04c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Sat, 1 Jul 2023 16:49:33 +0200 Subject: [PATCH] ffmpeg: remuxer: fix "initialization discards 'const' qualifier from pointer target type" (#80) * ffmpeg: fix compilation on `bookworm` * workflows: test on `bookworm` Co-authored-by: FacuM --- .github/workflows/build_test.yaml | 4 ++-- Makefile | 4 ++++ util/ffmpeg/remuxer.c | 7 ++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_test.yaml b/.github/workflows/build_test.yaml index df82d53..abea762 100644 --- a/.github/workflows/build_test.yaml +++ b/.github/workflows/build_test.yaml @@ -10,13 +10,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - debian_version: [bullseye] + debian_version: [bullseye, bookworm] docker_arch: [amd64, arm32v7, arm64v8] build_type: [generic, raspi] exclude: - docker_arch: amd64 build_type: raspi - - debian_version: buster + - debian_version: bookworm build_type: raspi steps: - name: Checkout diff --git a/Makefile b/Makefile index ed6b107..3c301e6 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,10 @@ GIT_REVISION ?= $(shell git rev-parse --short HEAD) CFLAGS := -Werror -Wall -g -I$(CURDIR) -D_GNU_SOURCE LDLIBS := -lpthread -lstdc++ +# libdatachannel deprecations on bookworm +# error: 'HMAC_Init_ex' is deprecated: Since OpenSSL 3.0 +CFLAGS += -Wno-error=deprecated-declarations + ifneq (x,x$(shell which ccache)) CCACHE ?= ccache endif diff --git a/util/ffmpeg/remuxer.c b/util/ffmpeg/remuxer.c index fb1b141..76b8c56 100644 --- a/util/ffmpeg/remuxer.c +++ b/util/ffmpeg/remuxer.c @@ -94,7 +94,12 @@ int ffmpeg_remuxer_open(ffmpeg_remuxer_t *remuxer) if (remuxer->packet) return 0; - AVInputFormat *input_format = av_find_input_format(remuxer->input_format); +#if LIBAVFORMAT_VERSION_MAJOR < 59 + AVInputFormat *input_format; +#else + const AVInputFormat *input_format; +#endif + input_format = av_find_input_format(remuxer->input_format); if (!input_format) return AVERROR(EINVAL);