Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 834401

Summary: media-video/dvdstyler-3.0.4 with ffmpeg-5.0: mediaenc_ffmpeg.cpp:95:47: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
Product: Gentoo Linux Reporter: Kobboi <gentoo>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 831437    
Attachments: build.log.gz
emerge-info.txt

Description Kobboi 2022-02-28 20:45:27 UTC
x86_64-pc-linux-gnu-g++ -DPACKAGE_NAME=\"DVDStyler\" -DPACKAGE_TARNAME=\"dvdstyler\" -DPACKAGE_VERSION=\"3.0.4\" -DPACKAGE_STRING=\"DVDStyler\ 3.0.4\" -DPACKAGE_BUGREPORT=\"http://www.dvdstyler.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"dvdstyler\" -DVERSION=\"3.0.4\" -DHAVE_CXX11=1 -I.   -DNDEBUG -I/usr/lib64/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__  -O2 -march=znver3 -pipe -g -ggdb3 -DNDEBUG -fno-strict-aliasing  -I/usr/lib64/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread    -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I/usr/include/uuid   -DHAVE_LIBUDEV -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include  -DHAVE_LIBDBUS -DDATADIR=\"/usr/share/dvdstyler\" -DUSE_FFMPEG=1 -I.. -O2 -march=znver3 -pipe -g -ggdb3 -DNDEBUG -fno-strict-aliasing  -I/usr/lib64/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread    -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I/usr/include/uuid   -DHAVE_LIBUDEV -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include  -DHAVE_LIBDBUS -DDATADIR=\"/usr/share/dvdstyler\" -DUSE_FFMPEG=1 -c -o MenuActionsDlg.o MenuActionsDlg.cpp
mediaenc_ffmpeg.cpp: In member function ‘bool wxFfmpegMediaEncoder::BeginEncode(const wxString&, VideoFormat, AudioFormat, AspectRatio, int, bool)’:
mediaenc_ffmpeg.cpp:95:47: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
   95 |                 outputFormat = av_guess_format(NULL, (const char*) fileName.ToUTF8(), NULL);
      |                                ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                               |
      |                                               const AVOutputFormat*
mediaenc_ffmpeg.cpp:97:47: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
   97 |                 outputFormat = av_guess_format("dvd", NULL, NULL);
      |                                ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                                               |
      |                                               const AVOutputFormat*
mediaenc_ffmpeg.cpp:118:33: error: ‘struct AVFormatContext’ has no member named ‘filename’
  118 |         av_strlcpy(m_outputCtx->filename, (const char*) fileName.ToUTF8(), sizeof(m_outputCtx->filename));
      |                                 ^~~~~~~~
mediaenc_ffmpeg.cpp:118:96: error: ‘struct AVFormatContext’ has no member named ‘filename’
  118 | ename, (const char*) fileName.ToUTF8(), sizeof(m_outputCtx->filename));
      |                                                             ^~~~~~~~

mediaenc_ffmpeg.cpp: In member function ‘bool wxFfmpegMediaEncoder::addVideoStream(int, VideoFormat, AspectRatio, int, bool)’:
mediaenc_ffmpeg.cpp:175:41: error: ‘struct AVStream’ has no member named ‘codec’
  175 |         AVCodecContext* c = m_videoStm->codec;
      |                                         ^~~~~
mediaenc_ffmpeg.cpp:176:10: error: invalid use of incomplete type ‘struct AVCodecContext’
  176 |         c->thread_count = m_threadCount;
      |          ^~
In file included from /usr/include/libavformat/avformat.h:313,
                 from mediaenc_ffmpeg.cpp:29:
/usr/include/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
  195 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
mediaenc_ffmpeg.cpp:177:10: error: invalid use of incomplete type ‘struct AVCodecContext’
  177 |         c->codec_id = (AVCodecID) codecId;
      |          ^~
In file included from /usr/include/libavformat/avformat.h:313,
                 from mediaenc_ffmpeg.cpp:29:
/usr/include/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
  195 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
mediaenc_ffmpeg.cpp:178:10: error: invalid use of incomplete type ‘struct AVCodecContext’
  178 |         c->codec_type = AVMEDIA_TYPE_VIDEO;
      |          ^~
In file included from /usr/include/libavformat/avformat.h:313,
                 from mediaenc_ffmpeg.cpp:29:
/usr/include/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
  195 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
mediaenc_ffmpeg.cpp:179:10: error: invalid use of incomplete type ‘struct AVCodecContext’
  179 |         c->bit_rate = videoBitrate * 1000;
      |          ^~
In file included from /usr/include/libavformat/avformat.h:313,
                 from mediaenc_ffmpeg.cpp:29:
/usr/include/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
  195 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
mediaenc_ffmpeg.cpp:181:10: error: invalid use of incomplete type ‘struct AVCodecContext’
  181 |         c->width = frameSize.GetWidth();
      |          ^~
In file included from /usr/include/libavformat/avformat.h:313,
                 from mediaenc_ffmpeg.cpp:29:
/usr/include/libavcodec/codec.h:195:8: note: forward declaration of ‘struct AVCodecContext’
  195 | struct AVCodecContext;
      |        ^~~~~~~~~~~~~~
mediaenc_ffmpeg.cpp:182:10: error: invalid use of incomplete type ‘struct AVCodecContext’
  182 |         c->height = frameSize.GetHeight();
      |          ^~


Reproducible: Always
Comment 1 Kobboi 2022-02-28 20:45:47 UTC
Created attachment 766061 [details]
build.log.gz
Comment 2 Kobboi 2022-02-28 20:45:49 UTC
Created attachment 766062 [details]
emerge-info.txt
Comment 3 Kobboi 2022-02-28 20:46:02 UTC
Compiles fine with ffmpeg-4.4.1
Comment 4 Alexis Ballier gentoo-dev 2022-03-12 13:09:39 UTC
commit eeba8be174a1d795b2a7bea5d050fd95f4751f03
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Mon Feb 28 10:48:38 2022 +0100

    media-video/dvdstyler: bump to 3.2.1
    
    use gtk3, fix build with ffmpeg 5
    
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Alexis Ballier <aballier@gentoo.org>