Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to build with ffmpeg 7 #3074

Open
marillat opened this issue Apr 9, 2024 · 1 comment
Open

Fail to build with ffmpeg 7 #3074

marillat opened this issue Apr 9, 2024 · 1 comment
Labels

Comments

@marillat
Copy link

marillat commented Apr 9, 2024

Debian amd64 unstable
All deprecated functions before 6.0 have been removed in this version.

libtool: compile:  clang -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/deadbeef-dmo-1.9.6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -D_GNU_SOURCE -D__EXTENSIONS__ -DLIBDIR=\"/usr/lib/x86_64-linux-gnu\" -DPREFIX=\"/usr\" -DDOCDIR=\"/usr/share/doc/deadbeef\" -DDDB_WARN_DEPRECATED=1 -std=c99 -I/usr/include/x86_64-linux-gnu -I../../include -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/deadbeef-dmo-1.9.6=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -D_GNU_SOURCE -D__EXTENSIONS__ -DLIBDIR=\"/usr/lib/x86_64-linux-gnu\" -DPREFIX=\"/usr\" -DDOCDIR=\"/usr/share/doc/deadbeef\" -DDDB_WARN_DEPRECATED=1 -c ffmpeg.c  -fPIC -DPIC -o .libs/ffmpeg_la-ffmpeg.o
ffmpeg.c:118:80: error: no member named 'channels' in 'struct AVCodecContext'
    if (!info->buffer || info->buffer_size < frame_size * info->codec_context->channels) {
                                                          ~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:123:61: error: no member named 'channels' in 'struct AVCodecContext'
        info->buffer_size = frame_size*info->codec_context->channels;
                                       ~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:140:14: warning: initializing 'AVCodec *' (aka 'struct AVCodec *') with an expression of type 'const AVCodec *' (aka 'const struct AVCodec *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
    AVCodec *codec = avcodec_find_decoder(format_context->streams[stream_index]->codecpar->codec_id);
             ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ffmpeg.c:234:42: error: no member named 'channels' in 'struct AVCodecContext'
    if (bps <= 0 || info->codec_context->channels <= 0 || samplerate <= 0) {
                    ~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:251:48: error: no member named 'channels' in 'struct AVCodecContext'
    _info->fmt.channels = info->codec_context->channels;
                          ~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:299:9: warning: 'avcodec_close' is deprecated [-Wdeprecated-declarations]
        avcodec_close (info->codec_context);
        ^
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:2386:1: note: 'avcodec_close' has been explicitly marked deprecated here
attribute_deprecated
^
/usr/include/x86_64-linux-gnu/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
#    define attribute_deprecated __attribute__((deprecated))
                                                ^
ffmpeg.c:399:54: error: no member named 'channels' in 'struct AVCodecContext'
                    int chCnt = info->codec_context->channels;
                                ~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:466:66: error: no member named 'channels' in 'struct AVCodecContext'
                        for (int c = 0; c < info->codec_context->channels; c++) {
                                            ~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:469:73: error: no member named 'channels' in 'struct AVCodecContext'
                                    info->buffer[i*info->codec_context->channels+c] = ((int8_t *)info->frame->extended_data[c])[i];
                                                   ~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:474:85: error: no member named 'channels' in 'struct AVCodecContext'
                                    ((int16_t*)info->buffer)[i*info->codec_context->channels+c] = outsample;
                                                               ~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:478:83: error: no member named 'channels' in 'struct AVCodecContext'
                                    memcpy (&info->buffer[(i*info->codec_context->channels+c)*3], &((int8_t*)info->frame->extended_data[c])[i*3], 3);
                                                             ~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:483:85: error: no member named 'channels' in 'struct AVCodecContext'
                                    ((int32_t*)info->buffer)[i*info->codec_context->channels+c] = sample;
                                                               ~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:787:41: error: no member named 'channels' in 'struct AVCodecContext'
    if (bps <= 0 || info.codec_context->channels <= 0 || samplerate <= 0) {
                    ~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:822:60: error: no member named 'channels' in 'struct AVCodecContext'
        snprintf (s, sizeof (s), "%d", info.codec_context->channels);
                                       ~~~~~~~~~~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/stdio2.h:61:31: note: expanded from macro 'snprintf'
                            __glibc_objsize (str), __VA_ARGS__)
                                                   ^~~~~~~~~~~
ffmpeg.c:921:22: warning: assigning to 'AVInputFormat *' (aka 'struct AVInputFormat *') from 'const AVInputFormat *' (aka 'const struct AVInputFormat *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        while ((ifmt = av_demuxer_iterate(&iter))) {
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 12 errors generated.
@kode54
Copy link
Contributor

kode54 commented Jun 22, 2024

And now Arch has updated to 7.0.1 in extra. I'll see if I can help fix this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants