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 <facumo.fm@gmail.com>
This commit is contained in:
Kamil Trzciński 2023-07-01 16:49:33 +02:00 committed by GitHub
parent 8d0c04ccd5
commit f04e9311ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View File

@ -10,13 +10,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
debian_version: [bullseye] debian_version: [bullseye, bookworm]
docker_arch: [amd64, arm32v7, arm64v8] docker_arch: [amd64, arm32v7, arm64v8]
build_type: [generic, raspi] build_type: [generic, raspi]
exclude: exclude:
- docker_arch: amd64 - docker_arch: amd64
build_type: raspi build_type: raspi
- debian_version: buster - debian_version: bookworm
build_type: raspi build_type: raspi
steps: steps:
- name: Checkout - name: Checkout

View File

@ -9,6 +9,10 @@ GIT_REVISION ?= $(shell git rev-parse --short HEAD)
CFLAGS := -Werror -Wall -g -I$(CURDIR) -D_GNU_SOURCE CFLAGS := -Werror -Wall -g -I$(CURDIR) -D_GNU_SOURCE
LDLIBS := -lpthread -lstdc++ 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)) ifneq (x,x$(shell which ccache))
CCACHE ?= ccache CCACHE ?= ccache
endif endif

View File

@ -94,7 +94,12 @@ int ffmpeg_remuxer_open(ffmpeg_remuxer_t *remuxer)
if (remuxer->packet) if (remuxer->packet)
return 0; 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) if (!input_format)
return AVERROR(EINVAL); return AVERROR(EINVAL);