Bug#1072422: hacktv: FTBFS with ffmpeg 7.0: ffmpeg.c:753:44: error: ‘AVCodecContext’ has no member named ‘channels’
Source: hacktv
Version: 0+git20230104+ds-2
Severity: important
Tags: trixie sid ftbfs
Usertags: ffmpeg-7.0
Hi,
during a rebuild of the reverse dependencies for the transition to
ffmpeg 7.0, your package failed to build
Relevant part (hopefully):
> aarch64-linux-gnu-gcc -g -Wall -pthread -O3 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wall -pedantic -DHAVE_SOAPYSDR -DHAVE_FL2K -I/usr/include/aarch64-linux-gnu -I/usr/include/libhackrf -I/usr/include/libusb-1.0 -I/usr/include/ -c file.c -o file.o
> ffmpeg.c: In function ‘_audio_scaler_thread’:
> ffmpeg.c:753:44: error: ‘AVCodecContext’ has no member named ‘channels’
> 753 | av->audio_codec_ctx->channels,
> | ^~
> ffmpeg.c: In function ‘av_ffmpeg_open’:
> ffmpeg.c:948:64: error: ‘AVCodecParameters’ has no member named ‘channels’
> 948 | if(av->format_ctx->streams[i]->codecpar->channels <= 0) continue;
> | ^~
> ffmpeg.c:1080:42: error: ‘AVCodecContext’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
> 1080 | if(!av->audio_codec_ctx->channel_layout)
> | ^~~~~~~~~~~~~~
> | ch_layout
> ffmpeg.c:1083:46: error: ‘AVCodecContext’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
> 1083 | av->audio_codec_ctx->channel_layout = av_get_default_channel_layout(av->audio_codec_ctx->channels);
> | ^~~~~~~~~~~~~~
> | ch_layout
> ffmpeg.c:1083:63: error: implicit declaration of function ‘av_get_default_channel_layout’ [-Werror=implicit-function-declaration]
> 1083 | av->audio_codec_ctx->channel_layout = av_get_default_channel_layout(av->audio_codec_ctx->channels);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ffmpeg.c:1083:112: error: ‘AVCodecContext’ has no member named ‘channels’
> 1083 | av->audio_codec_ctx->channel_layout = av_get_default_channel_layout(av->audio_codec_ctx->channels);
> | ^~
> ffmpeg.c:1086:90: error: ‘AVCodecContext’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
> 1086 | av_opt_set_int(av->swr_ctx, "in_channel_layout", av->audio_codec_ctx->channel_layout, 0);
> | ^~~~~~~~~~~~~~
> | ch_layout
> ffmpeg.c:1195:56: error: ‘AVFrame’ has no member named ‘channel_layout’; did you mean ‘ch_layout’?
> 1195 | av->out_audio_buffer.frame[i]->channel_layout = AV_CH_LAYOUT_STEREO;
> | ^~~~~~~~~~~~~~
> | ch_layout
> cc1: some warnings being treated as errors
> make[2]: *** [Makefile:32: ffmpeg.o] Error 1
The full build log is available from:
https://people.debian.org/~sramacher/ffmpeg-7.0/hacktv_arm64.build
ffmpeg 7.0 is available in experimental.
Cheers
--
Sebastian Ramacher
Reply to: