Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834392 - media-sound/deadbeef-1.8.8-r2 with ffmpeg-5.0: ffmpeg.c:181:45: error: no member named 'codec' in 'struct AVStream
Summary: media-sound/deadbeef-1.8.8-r2 with ffmpeg-5.0: ffmpeg.c:181:45: error: no mem...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Piotr Karbowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ffmpeg-5.0
  Show dependency tree
 
Reported: 2022-02-28 20:11 UTC by Kobboi
Modified: 2022-10-02 17:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (build.log.gz,81.71 KB, application/gzip)
2022-02-28 20:12 UTC, Kobboi
Details
emerge-info.txt (emerge-info.txt,8.00 KB, text/plain)
2022-02-28 20:12 UTC, Kobboi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kobboi 2022-02-28 20:11:40 UTC
Making all in plugins/ffmpeg
make[2]: Entering directory '/var/tmp/portage/media-sound/deadbeef-1.8.8-r2/work/deadbeef-1.8.8/plugins/ffmpeg'
/bin/sh ../../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-clang -DHAVE_CONFIG_H -I. -I../..    -O2 -march=znver3 -pipe -g -ggdb3  -D_GNU_SOURCE -D__EXTENSIONS__  -DLIBDIR=\"/usr/lib64\" -DPREFIX=\"/usr\" -DDOCDIR=\"/usr/share/doc/deadbeef-1.8.8-r2\" -DDDB_WARN_DEPRECATED=1 -std=c99  -O2 -march=znver3 -pipe -g -ggdb3  -D_GNU_SOURCE -D__EXTENSIONS__  -DLIBDIR=\"/usr/lib64\" -DPREFIX=\"/usr\" -DDOCDIR=\"/usr/share/doc/deadbeef-1.8.8-r2\" -DDDB_WARN_DEPRECATED=1 -c -o ffmpeg.lo ffmpeg.c
libtool: compile:  x86_64-pc-linux-gnu-clang -DHAVE_CONFIG_H -I. -I../.. -O2 -march=znver3 -pipe -g -ggdb3 -D_GNU_SOURCE -D__EXTENSIONS__ -DLIBDIR=\"/usr/lib64\" -DPREFIX=\"/usr\" -DDOCDIR=\"/usr/share/doc/deadbeef-1.8.8-r2\" -DDDB_WARN_DEPRECATED=1 -std=c99 -O2 -march=znver3 -pipe -g -ggdb3 -D_GNU_SOURCE -D__EXTENSIONS__ -DLIBDIR=\"/usr/lib64\" -DPREFIX=\"/usr\" -DDOCDIR=\"/usr/share/doc/deadbeef-1.8.8-r2\" -DDDB_WARN_DEPRECATED=1 -c ffmpeg.c  -fPIC -DPIC -o .libs/ffmpeg.o
ffmpeg.c:181:45: error: no member named 'codec' in
      'struct AVStream'
        info->ctx = info->fctx->streams[i]->codec;
                    ~~~~~~~~~~~~~~~~~~~~~~  ^
ffmpeg.c:184:25: warning: assigning to 'AVCodec *'
      (aka 'struct AVCodec *') from 'const AVCodec *' (aka
      'const struct AVCodec *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
            info->codec = avcodec_find_decoder (info->ctx->codec_id);
                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ffmpeg.c:328:19: warning: implicit declaration of function
      'avcodec_decode_audio4' is invalid in C99
      [-Wimplicit-function-declaration]
            len = avcodec_decode_audio4(info->ctx, info->frame, &got_fra...
                  ^
ffmpeg.c:690:33: error: no member named 'codec' in
      'struct AVStream'
        ctx = fctx->streams[i]->codec;
              ~~~~~~~~~~~~~~~~  ^
ffmpeg.c:698:19: warning: assigning to 'AVCodec *'
      (aka 'struct AVCodec *') from 'const AVCodec *' (aka
      'const struct AVCodec *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
            codec = avcodec_find_decoder(ctx->codec_id);
                  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ffmpeg.c:760:42: warning: format specifies type 'long long'
      but the argument has type 'int64_t' (aka 'long') [-Wformat]
        snprintf (s, sizeof (s), "%lld", fsize);
                                  ~~~~   ^~~~~
                                  %ld
ffmpeg.c:855:24: warning: implicit declaration of function
      'av_iformat_next' is invalid in C99 [-Wimplicit-function-declaration]
        while ((ifmt = av_iformat_next(ifmt))) {
                       ^
ffmpeg.c:855:22: warning: incompatible integer to pointer
      conversion assigning to 'AVInputFormat *' (aka 'struct AVInputFormat *')
      from 'int' [-Wint-conversion]
        while ((ifmt = av_iformat_next(ifmt))) {
                     ^ ~~~~~~~~~~~~~~~~~~~~~
ffmpeg.c:905:5: warning: implicit declaration of function
      'av_register_all' is invalid in C99 [-Wimplicit-function-declaration]
    av_register_all ();
    ^
ffmpeg.c:956:33: error: no member named 'codec' in
      'struct AVStream'
        ctx = fctx->streams[i]->codec;
              ~~~~~~~~~~~~~~~~  ^
ffmpeg.c:959:19: warning: assigning to 'AVCodec *'
      (aka 'struct AVCodec *') from 'const AVCodec *' (aka
      'const struct AVCodec *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
            codec = avcodec_find_decoder(ctx->codec_id);
                  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 warnings and 3 errors generated.


Reproducible: Always
Comment 1 Kobboi 2022-02-28 20:12:02 UTC
Created attachment 766045 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 20:12:04 UTC
Created attachment 766046 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 20:17:47 UTC
Compiles fine with:
* USE=ffmpeg and ffmpeg-4.4.1
* USE=-ffmpeg and ffmpeg-5.0
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-15 23:31:00 UTC
Should be fixed by bumping to 1.9.0/1.9.1.
Comment 5 tt_1 2022-05-16 05:00:11 UTC
(In reply to Sam James from comment #4)
> Should be fixed by bumping to 1.9.0/1.9.1.

have you runtime tested it? 1.8.8 did compile for me against ffmpeg-5.0, but the ffmpeg plugin was still broken at runtime: 

loading plugin /usr/lib64/deadbeef/ffmpeg.so
dlopen error: /usr/lib64/deadbeef/ffmpeg.so: undefined symbol: av_register_all
trying /usr/lib64/deadbeef/ffmpeg.fallback.so...
plugin ffmpeg.so not found or failed to load
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-16 07:31:06 UTC
(In reply to tt_1 from comment #5)
> (In reply to Sam James from comment #4)
> > Should be fixed by bumping to 1.9.0/1.9.1.
> 
> have you runtime tested it? 1.8.8 did compile for me against ffmpeg-5.0, but
> the ffmpeg plugin was still broken at runtime: 
> 
> loading plugin /usr/lib64/deadbeef/ffmpeg.so
> dlopen error: /usr/lib64/deadbeef/ffmpeg.so: undefined symbol:
> av_register_all
> trying /usr/lib64/deadbeef/ffmpeg.fallback.so...
> plugin ffmpeg.so not found or failed to load

No, I'm just commenting that upstream seem to think it's fixed now. That's why I didn't bump it -- I'm not the maintainer and I haven't tested it :)

Feel free to report the issue to them upstream if you're having issues with the new release.
Comment 7 Piotr Karbowski (RETIRED) gentoo-dev 2022-05-16 09:54:57 UTC
Deadbeef got a new release few days ago, I will see how it works with new ffmpeg.
Comment 8 tt_1 2022-05-16 17:46:58 UTC
please try to juggle a few flags here and there for 1.9.1, at least one combination was broken for me and fixed in https://github.com/DeaDBeeF-Player/deadbeef/issues/2796
Comment 10 Piotr Karbowski (RETIRED) gentoo-dev 2022-10-02 17:17:51 UTC
The patch does not apply on the top of latest 1.9.2 release, I will wait for new release, unless it will take few weeks, then I will attempt to backport it to 1.9.2 code base.
Comment 11 Piotr Karbowski (RETIRED) gentoo-dev 2022-10-02 17:20:10 UTC
Disregard my last comment, I confused the patches.
Comment 12 tt_1 2022-10-02 17:23:36 UTC
Indeed, it's actually the very first commit since the release of v1.9.2 :-)
Comment 13 Larry the Git Cow gentoo-dev 2022-10-02 17:24:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee84d83ae840f477f1ce10c1477748ea2cb5445d

commit ee84d83ae840f477f1ce10c1477748ea2cb5445d
Author:     Piotr Karbowski <slashbeast@gentoo.org>
AuthorDate: 2022-10-02 17:23:10 +0000
Commit:     Piotr Karbowski <slashbeast@gentoo.org>
CommitDate: 2022-10-02 17:24:11 +0000

    media-sound/deadbeef: 1.9.2 version bump.
    
    Together with upstream ffmpeg-5.0 build fixes and Werror dropping patch.
    
    Closes: https://bugs.gentoo.org/show_bug.cgi?id=854984
    Closes: https://bugs.gentoo.org/show_bug.cgi?id=834392
    Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>

 media-sound/deadbeef/Manifest                      |   1 +
 media-sound/deadbeef/deadbeef-1.9.2.ebuild         | 193 +++++++++++++++++++++
 .../files/deadbeef-1.9.1-ffmpeg-5.0-fixes.patch    |  37 ++++
 .../files/deadbeef-1.9.2-drop-Werror.patch         |  54 ++++++
 4 files changed, 285 insertions(+)