diff --git a/multimedia/vlc/Makefile b/multimedia/vlc/Makefile index 8b5911ac8653..fcb368e641d9 100644 --- a/multimedia/vlc/Makefile +++ b/multimedia/vlc/Makefile @@ -1,407 +1,405 @@ PORTNAME= vlc -DISTVERSION= 3.0.21 -PORTREVISION= 21 +DISTVERSION= 3.0.22 PORTEPOCH= 4 CATEGORIES= multimedia audio net www MASTER_SITES= https://get.videolan.org/${PORTNAME}/${DISTVERSION:S/a$//}/ \ https://mirror.init7.net/videolan/${PORTNAME}/${DISTVERSION:S/a$//}/ \ http://mirror.clarkson.edu/videolan/${PORTNAME}/${DISTVERSION:S/a$//}/ \ http://ftp.kaist.ac.kr/vlc/${PORTNAME}/${DISTVERSION:S/a$//}/ \ http://download.videolan.org/pub/videolan/${PORTNAME}/${DISTVERSION:S/a$//}/ MAINTAINER= multimedia@FreeBSD.org COMMENT= Qt based multimedia player and streaming server WWW= https://www.videolan.org LICENSE= GPLv2 BUILD_DEPENDS= gsed:textproc/gsed \ ffmpeg>=3.4.1,1:multimedia/ffmpeg \ yasm:devel/yasm LIB_DEPENDS= libgcrypt.so:security/libgcrypt \ libdvbpsi.so:multimedia/libdvbpsi \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libidn.so:dns/libidn \ libmatroska.so:multimedia/libmatroska \ libgpg-error.so:security/libgpg-error \ libebml.so:textproc/libebml RUN_DEPENDS= ffmpeg>=3.4.1,1:multimedia/ffmpeg -EXTRA_PATCHES= ${FILESDIR}/vlc-3.0.21-fedora_ffmpeg7-1.patch:-p1 \ - ${FILESDIR}/vlc-3.0.21-ffmpeg8-1.patch:-p1 +EXTRA_PATCHES= ${FILESDIR}/vlc-3.0.22-ffmpeg8.patch:-p1 USES= compiler:c++17-lang cpe desktop-file-utils elfctl gettext-tools \ gl gmake gnome iconv:wchar_t libtool localbase pathfix pkgconfig \ tar:xz USE_GL= opengl CPE_VENDOR= videolan USE_GNOME= libxml2 USE_LDCONFIG= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-avcodec --enable-avformat --enable-dvbpsi \ --enable-fontconfig --enable-freetype --enable-libgcrypt \ --enable-libxml2 --enable-oss --enable-postproc \ --enable-swscale --enable-vlc \ --disable-alsa --disable-aribb25 \ --disable-chromaprint --disable-crystalhd --disable-dc1394 \ --disable-decklink --disable-dsm --disable-dv1394 \ --disable-fdkaac --disable-gst-decode --disable-gles2 \ --disable-kai --disable-kate --disable-kva --disable-libcddb \ --disable-mpc --disable-mpg123 --disable-vnc --disable-opencv \ --disable-projectm --disable-schroedinger --disable-secret \ --disable-sid --disable-soxr --disable-telx --disable-tiger \ --disable-tremor --disable-udev --disable-update-check \ --disable-vsxu --disable-wasapi --disable-x26410b \ --with-kde-solid=${PREFIX}/share/solid/actions \ ac_cv_search_pthread_rwlock_init=-pthread \ BUILDCC="${CC}" .if defined(WITH_DEBUG) CONFIGURE_ARGS+=--enable-debug .endif INSTALL_TARGET= install-strip CFLAGS+= -Wno-unreachable-code-generic-assoc CFLAGS_i386= -fomit-frame-pointer ELF_FEATURES= +noaslr:bin/.libs/vlc # See PR 270038 BINARY_ALIAS= sed=${LOCALBASE}/bin/gsed PORTDATA= * PORTDOCS= * OPTIONS_DEFINE= A52 AALIB AOM ARIBSUB ASS AVAHI CACA CHROMECAST DAV1D DBUS DCA \ DEBUG DOCS DVDNAV DVDREAD DEBUG FAAD FLAC FLUID FREERDP FRIBIDI \ GME GNUTLS GOOM HARFBUZZ JACK JPEG LIBBLURAY LIBPLACEBO LIBRSVG2 \ LIBSSH2 LIRC LIVEMEDIA LUA MAD MFX MODPLUG MPEG2 MTP \ NCURSES NFS NLS NOTIFY OGGSPOTS OGG OPTIMIZED_CFLAGS OPUS PNG \ PULSEAUDIO QT5 REALRTSP RUNROOT SAMPLERATE SDL SHOUTCAST \ SKINS SMB SNDIO SPEEX SRT STREAM TAGLIB THEORA TWOLAME UPNP V4L \ VAAPI VCD VDPAU VORBIS VPX WAYLAND X11 X264 X265 ZVBI OPTIONS_DEFINE_powerpc= ALTIVEC OPTIONS_DEFINE_powerpc64= ALTIVEC OPTIONS_DEFAULT=ASS AVAHI CHROMECAST DAV1D DBUS DVDNAV DVDREAD GNUTLS HARFBUZZ \ JPEG LIVEMEDIA LUA OGG OPTIMIZED_CFLAGS OPUS PNG QT5 SAMPLERATE \ SKINS SPEEX STREAM TAGLIB THEORA TWOLAME UPNP V4L VAAPI VCD \ VDPAU VORBIS WAYLAND X11 OPTIONS_DEFAULT_powerpc= ALTIVEC OPTIONS_DEFAULT_powerpc64= ALTIVEC OPTIONS_EXCLUDE= LIBPLACEBO # https://code.videolan.org/videolan/vlc/-/commit/8e22c39ea3c3 OPTIONS_EXCLUDE+= VAAPI # Not compatible until VLC 4 OPTIONS_SUB= yes AOM_DESC= AV1 video encoding/decoding via libaom ARIBSUB_DESC= ARIB text decoding via libaribb24 ASS_DESC= ASS/SSA subtitle rendering CHROMECAST_DESC= Streaming to Chromecast devices DAV1D_DESC= AV1 video decoding via libdav1d DVDNAV_DESC= DVD menu navigation DVDREAD_DESC= DVD Playback support FLUID_DESC= Fluidsynth MIDI support FREERDP_DESC= RDP support GME_DESC= Game Music Emu (libgme) support GOOM_DESC= Goom visualisation plugin HARFBUZZ_DESC= OpenType text shaping engine LIBPLACEBO_DESC= HDR tonemapping support through libplacebo LIBSSH2_DESC= SCP/SFTP support via libssh2 MFX_DESC= Intel MediaSDK (aka Quick Sync Video) OGGSPOTS_DESC= Experimental OggSpots codec REALRTSP_DESC= Real RTSP access module RUNROOT_DESC= Enable running as root SKINS_DESC= Build skins2 interface module (implies QT5) SRT_DESC= Secure Reliable Transport support STREAM_DESC= stream output TAGLIB_DESC= ID3 tag and Ogg comment support VCD_DESC= Audio/Video CD support ZVBI_DESC= VBI decoding support A52_LIB_DEPENDS= liba52.so:audio/liba52 A52_CONFIGURE_ON= --with-a52=${LOCALBASE} A52_CONFIGURE_ENABLE= a52 AALIB_LIB_DEPENDS= libaa.so:graphics/aalib AALIB_CONFIGURE_ENABLE= aa ALTIVEC_CONFIGURE_ENABLE= altivec ALTIVEC_CFLAGS= -maltivec AOM_LIB_DEPENDS= libaom.so:multimedia/aom AOM_CONFIGURE_ENABLE= aom ARIBSUB_LIB_DEPENDS= libaribb24.so:multimedia/aribb24 ARIBSUB_CONFIGURE_ENABLE= aribsub ASS_LIB_DEPENDS= libass.so:multimedia/libass ASS_CONFIGURE_ENABLE= libass AVAHI_LIB_DEPENDS= libavahi-common.so:net/avahi-app AVAHI_CONFIGURE_ENABLE= avahi CACA_LIB_DEPENDS= libcaca.so:graphics/libcaca CACA_CONFIGURE_ENABLE= caca CHROMECAST_LIB_DEPENDS= libabsl_base.so:devel/abseil \ libprotobuf-lite.so:devel/protobuf CHROMECAST_USE= cxxstd=c++17 CHROMECAST_CONFIGURE_ENABLE= chromecast DAV1D_LIB_DEPENDS= libdav1d.so:multimedia/dav1d DAV1D_CONFIGURE_ENABLE= dav1d DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DBUS_CONFIGURE_ENABLE= dbus DCA_LIB_DEPENDS= libdca.so:multimedia/libdca DCA_CONFIGURE_ENABLE= dca DVDNAV_LIB_DEPENDS= libdvdnav.so:multimedia/libdvdnav DVDNAV_CONFIGURE_ENABLE= dvdnav DVDREAD_LIB_DEPENDS= libdvdread.so:multimedia/libdvdread DVDREAD_CONFIGURE_ENABLE= dvdread FAAD_LIB_DEPENDS= libfaad.so:audio/faad FAAD_CONFIGURE_ENABLE= faad FAAD_CONFIGURE_ENV= CPPFLAGS_faad="-I${LOCALBASE}/include" \ LIBS_faad="-L${LOCALBASE}/lib" FLAC_LIB_DEPENDS= libFLAC.so:audio/flac FLAC_CONFIGURE_ENABLE= flac FLUID_LIB_DEPENDS= libfluidsynth.so:audio/fluidsynth FLUID_CONFIGURE_ENABLE= fluidsynth FREERDP_LIB_DEPENDS= libfreerdp2.so:net/freerdp FREERDP_CONFIGURE_ENABLE= freerdp FREERDP_CONFIGURE_ENV= FREERDP_CFLAGS="-I${LOCALBASE}/include/freerdp2 \ -I${LOCALBASE}/include/winpr2" \ FREERDP_LIBS="-L${LOCALBASE}/lib" FREERDP_CFLAGS= -Wno-error=incompatible-function-pointer-types FRIBIDI_LIB_DEPENDS= libfribidi.so:converters/fribidi FRIBIDI_CONFIGURE_ENABLE= fribidi GME_LIB_DEPENDS= libgme.so:audio/libgme GME_CONFIGURE_ENABLE= gme GME_CONFIGURE_ENV= LIBS_gme="-L${LOCALBASE}/lib -lgme" GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls GNUTLS_CONFIGURE_ENABLE=gnutls GOOM_LIB_DEPENDS= libgoom2.so:graphics/goom GOOM_CONFIGURE_ENABLE= goom HARFBUZZ_LIB_DEPENDS= libharfbuzz.so:print/harfbuzz HARFBUZZ_CONFIGURE_ENABLE= harfbuzz JACK_LIB_DEPENDS= libjack.so:audio/jack JACK_CONFIGURE_ENABLE= jack JPEG_USES= jpeg JPEG_CONFIGURE_ENABLE= jpeg LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray LIBBLURAY_CONFIGURE_ENABLE= bluray LIBPLACEBO_LIB_DEPENDS= libplacebo.so:graphics/libplacebo LIBPLACEBO_CONFIGURE_ENABLE= libplacebo LIBRSVG2_USE= GNOME=librsvg2,cairo LIBRSVG2_CONFIGURE_ENABLE= svg svgdec LIBSSH2_LIB_DEPENDS= libssh2.so:security/libssh2 LIBSSH2_CONFIGURE_ENABLE= sftp LIRC_LIB_DEPENDS= liblirc_client.so:comms/lirc LIRC_CONFIGURE_ENABLE= lirc LIRC_CONFIGURE_ENV= LIBS_lirc="-L${LOCALBASE}/lib -llirc_client" LIVEMEDIA_LIB_DEPENDS= libliveMedia.so:net/liveMedia LIVEMEDIA_USES= ssl LIVEMEDIA_CONFIGURE_ENABLE= live555 LIVEMEDIA_CONFIGURE_ENV= \ LIVE555_CFLAGS="-I${LOCALBASE}/include/liveMedia \ -I${LOCALBASE}/include/UsageEnvironment \ -I${LOCALBASE}/include/groupsock \ -I${LOCALBASE}/include/BasicUsageEnvironment" \ LIVE555_LIBS="-L${LOCALBASE}/lib -lliveMedia \ -lgroupsock -lBasicUsageEnvironment \ -lUsageEnvironment \ -L${OPENSSLLIB} -lssl -lcrypto" LUA_USES= lua LUA_CONFIGURE_ON= LUAC=${LUAC_CMD} LUA_CFLAGS="-I${LUA_INCDIR}" \ LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER}" LUA_CONFIGURE_ENABLE= lua MAD_LIB_DEPENDS= libmad.so:audio/libmad MAD_CONFIGURE_ON= --with-mad=${LOCALBASE} MAD_CONFIGURE_ENABLE= mad MFX_LIB_DEPENDS= libmfx.so:multimedia/intel-media-sdk MFX_CONFIGURE_ENABLE= mfx MODPLUG_LIB_DEPENDS= libmodplug.so:audio/libmodplug MODPLUG_CONFIGURE_ENABLE= mod MPEG2_LIB_DEPENDS= libmpeg2.so:multimedia/libmpeg2 MPEG2_CONFIGURE_ENABLE= libmpeg2 MTP_LIB_DEPENDS= libmtp.so:multimedia/libmtp MTP_CONFIGURE_ENABLE= mtp NCURSES_USES= ncurses NCURSES_CONFIGURE_ENABLE= ncurses NCURSES_CONFIGURE_ENV= NCURSES_CFLAGS="-I${NCURSESINC}" \ NCURSES_LIBS="-L${NCURSESLIB} -lncursesw" NFS_LIB_DEPENDS= libnfs.so:net/libnfs NFS_CONFIGURE_ENABLE= nfs NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls NOTIFY_LIB_DEPENDS= libnotify.so:devel/libnotify NOTIFY_USE= GNOME=gtk30,cairo NOTIFY_CONFIGURE_ENABLE= notify OGGSPOTS_IMPLIES= OGG OGGSPOTS_CONFIGURE_ENABLE= oggspots OGG_LIB_DEPENDS= libogg.so:audio/libogg OGG_CONFIGURE_ENABLE= ogg OPTIMIZED_CFLAGS_CONFIGURE_ENABLE= optimizations OPUS_LIB_DEPENDS= libopus.so:audio/opus OPUS_CONFIGURE_ENABLE= opus PNG_LIB_DEPENDS= libpng.so:graphics/png PNG_CONFIGURE_ENABLE= png PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_CONFIGURE_ENABLE= pulse QT5_IMPLIES= X11 QT5_USES= qt:5 QT5_USE= QT=gui,core,svg,widgets,x11extras,buildtools:build QT5_CONFIGURE_ENABLE= qt REALRTSP_CONFIGURE_ENABLE= realrtsp RUNROOT_CONFIGURE_ENABLE= run-as-root SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate SAMPLERATE_CONFIGURE_ENABLE= samplerate SDL_USES= sdl SDL_USE= SDL=image SDL_CONFIGURE_ENABLE= sdl-image SHOUTCAST_LIB_DEPENDS= libshout.so:audio/libshout SHOUTCAST_CONFIGURE_ENABLE= shout SKINS_IMPLIES= QT5 SKINS_USES= libarchive xorg SKINS_USE= XORG=xext,xinerama,xpm SKINS_CONFIGURE_ENABLE= archive skins2 SMB_USES= samba:lib SMB_CONFIGURE_ENABLE= smbclient SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_CONFIGURE_ENABLE= sndio SPEEX_LIB_DEPENDS= libspeex.so:audio/speex \ libspeexdsp.so:audio/speexdsp SPEEX_CONFIGURE_ENABLE= speex SRT_LIB_DEPENDS= libsrt.so:www/srt SRT_CONFIGURE_ENABLE= srt STREAM_CONFIGURE_ENABLE= sout TAGLIB_LIB_DEPENDS= libtag.so:audio/taglib TAGLIB_CONFIGURE_ENABLE= taglib THEORA_LIB_DEPENDS= libtheora.so:multimedia/libtheora THEORA_CONFIGURE_ENABLE= theora TWOLAME_LIB_DEPENDS= libtwolame.so:audio/twolame TWOLAME_CONFIGURE_ENABLE= twolame UPNP_LIB_DEPENDS= libupnp.so:devel/upnp UPNP_CONFIGURE_ENABLE= upnp V4L_BUILD_DEPENDS= v4l_compat>=0:multimedia/v4l_compat V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l V4L_CONFIGURE_ENABLE= v4l2 VAAPI_LIB_DEPENDS= libva.so:multimedia/libva VAAPI_CONFIGURE_ENABLE= libva VCD_CONFIGURE_ENABLE= vcd VDPAU_IMPLIES= X11 VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau VDPAU_CONFIGURE_ENABLE= vdpau VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis VORBIS_CONFIGURE_ENABLE= vorbis VPX_LIB_DEPENDS= libvpx.so:multimedia/libvpx VPX_CONFIGURE_ENABLE= vpx WAYLAND_CATEGORIES= wayland WAYLAND_BUILD_DEPENDS= wayland-protocols>=0:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland WAYLAND_CONFIGURE_ENABLE= wayland X11_LIB_DEPENDS= libxcb-keysyms.so:x11/xcb-util-keysyms X11_USES= xorg X11_USE= XORG=xcb,xorgproto,sm,ice,x11 X11_CONFIGURE_ENABLE= xcb xvideo X11_CONFIGURE_WITH= x X264_LIB_DEPENDS= libx264.so:multimedia/libx264 X264_CONFIGURE_ENABLE= x264 X265_LIB_DEPENDS= libx265.so:multimedia/x265 X265_CONFIGURE_ENABLE= x265 ZVBI_LIB_DEPENDS= libzvbi.so:devel/libzvbi ZVBI_CONFIGURE_ENABLE= zvbi WITH_CDROM_DEVICE?=/dev/cd0 WITH_DVD_DEVICE?=/dev/cd0 .include .if ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+=--enable-debug --disable-optimizations CFLAGS+=-g -O0 CXXFLAGS+=-g -O0 .endif post-patch: @${REINPLACE_CMD} \ -e '\|LIBS|s|-lrt||' \ -e 's|LIBS="-llirc_client|LIBS="$$LIBS_lirc|' \ -e '/PKG_CONFIG/s|\"gl\"|"opengl"|g' \ ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|/dev/cdrom|${WITH_CDROM_DEVICE}|g' \ -e 's|/dev/dvd|${WITH_DVD_DEVICE}|g' \ ${WRKSRC}/src/libvlc-module.c @${RM} -r ${WRKSRC}/modules/access/v4l2/linux # XXX FreeBSD doesn't have strerror_l() - use the android version of error.c @${CP} ${WRKSRC}/src/android/error.c ${WRKSRC}/src/posix post-install: @(cd ${STAGEDIR}${PREFIX} && ${FIND} -s lib/vlc -not -name '*.la' \ -type f -o -type l >> ${TMPPLIST}) @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/vlc/plugins/*/*.so # plugin cache becomes stale after strip. Regenerate it: ${WRKSRC}/bin/vlc-cache-gen ${STAGEDIR}${PREFIX}/lib/vlc/plugins .include diff --git a/multimedia/vlc/distinfo b/multimedia/vlc/distinfo index f6fefd30d612..fcc6ae9e4cb3 100644 --- a/multimedia/vlc/distinfo +++ b/multimedia/vlc/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1718023017 -SHA256 (vlc-3.0.21.tar.xz) = 24dbbe1d7dfaeea0994d5def0bbde200177347136dbfe573f5b6a4cee25afbb0 -SIZE (vlc-3.0.21.tar.xz) = 25649288 +TIMESTAMP = 1766620787 +SHA256 (vlc-3.0.22.tar.xz) = e2cc1cf0ae0902a09da5a37c249a8a4e4b5ec4dc095443b8e1493c6a7cc138ea +SIZE (vlc-3.0.22.tar.xz) = 26427084 diff --git a/multimedia/vlc/files/patch-modules_access_live555.cpp b/multimedia/vlc/files/patch-modules_access_live555.cpp deleted file mode 100644 index e2cdbce158dd..000000000000 --- a/multimedia/vlc/files/patch-modules_access_live555.cpp +++ /dev/null @@ -1,17 +0,0 @@ -The signature of doEventLoop() was changed to match that of -triggerEvent(), by using std::atomic_char as the 'watch variable' -type in net/liveMedia 2024.11.28. - ---- modules/access/live555.cpp.orig 2024-06-05 15:56:07 UTC -+++ modules/access/live555.cpp -@@ -236,8 +236,8 @@ struct demux_sys_t - bool b_no_data; /* if we never received any data */ - int i_no_data_ti; /* consecutive number of TaskInterrupt */ - -- char event_rtsp; -- char event_data; -+ std::atomic_char event_rtsp; -+ std::atomic_char event_data; - - bool b_get_param; /* Does the server support GET_PARAMETER */ - bool b_paused; /* Are we paused? */ diff --git a/multimedia/vlc/files/patch-modules_meta__engine_taglib.cpp b/multimedia/vlc/files/patch-modules_meta__engine_taglib.cpp deleted file mode 100644 index 1c4cdf0b9ec3..000000000000 --- a/multimedia/vlc/files/patch-modules_meta__engine_taglib.cpp +++ /dev/null @@ -1,159 +0,0 @@ -Backport upstream fixes for taglib 2.x support and remove usages of member -functions that were deprecated in taglib 1.x and removed in 2.x. - -Obtained from: -https://code.videolan.org/videolan/vlc/-/commit/d2663d6c3fe3af76bdefd58367b4a45c598b83e4 -https://code.videolan.org/videolan/vlc/-/commit/ac59d0ba59ba800c52c0a92ec1d9576d2653dbe2 -https://code.videolan.org/videolan/vlc/-/commit/c404fdb24183031a419667639846edddca3401f8 -https://code.videolan.org/videolan/vlc/-/commit/ec29dfca1e59530dd412d779e0b045079b72ffb6 - ---- modules/meta_engine/taglib.cpp.orig 2023-04-22 23:27:28 UTC -+++ modules/meta_engine/taglib.cpp -@@ -125,7 +125,11 @@ File *VLCTagLib::ExtResolver::createFile(FileName f - template - File *VLCTagLib::ExtResolver::createFile(FileName fileName, bool, AudioProperties::ReadStyle) const - { -+#if defined(_WIN32) && TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ std::string filename = fileName.toString().to8Bit(true); -+#else - std::string filename = std::string(fileName); -+#endif - std::size_t namesize = filename.size(); - - if (namesize > ext.length()) -@@ -180,12 +184,16 @@ class VlcIostream : public IOStream (public) - return m_stream->psz_location; - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ ByteVector readBlock(size_t length) -+#else - ByteVector readBlock(ulong length) -+#endif - { - ByteVector res(length, 0); - ssize_t i_read = vlc_stream_Read( m_stream, res.data(), length); - if (i_read < 0) -- return ByteVector::null; -+ return {}; - else if ((size_t)i_read != length) - res.resize(i_read); - return res; -@@ -196,11 +204,19 @@ class VlcIostream : public IOStream (public) - // Let's stay Read-Only for now - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ void insert(const ByteVector&, offset_t, size_t) -+#else - void insert(const ByteVector&, ulong, ulong) -+#endif - { - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ void removeBlock(offset_t, size_t) -+#else - void removeBlock(ulong, ulong) -+#endif - { - } - -@@ -214,7 +230,11 @@ class VlcIostream : public IOStream (public) - return true; - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ void seek(offset_t offset, Position p) -+#else - void seek(long offset, Position p) -+#endif - { - uint64_t pos = 0; - switch (p) -@@ -237,12 +257,20 @@ class VlcIostream : public IOStream (public) - return; - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ offset_t tell() const -+#else - long tell() const -+#endif - { - return m_previousPos; - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ offset_t length() -+#else - long length() -+#endif - { - uint64_t i_size; - if (vlc_stream_GetSize( m_stream, &i_size ) != VLC_SUCCESS) -@@ -250,7 +278,11 @@ class VlcIostream : public IOStream (public) - return i_size; - } - -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ void truncate(offset_t) -+#else - void truncate(long) -+#endif - { - } - -@@ -465,7 +497,7 @@ static void ReadMetaFromBasicTag(const Tag* tag, vlc_m - static void ReadMetaFromBasicTag(const Tag* tag, vlc_meta_t *dest) - { - #define SET( accessor, meta ) \ -- if( !tag->accessor().isNull() && !tag->accessor().isEmpty() ) \ -+ if( !tag->accessor().isEmpty() ) \ - vlc_meta_Set##meta( dest, tag->accessor().toCString(true) ) - #define SETINT( accessor, meta ) \ - if( tag->accessor() ) \ -@@ -806,15 +838,15 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_meta - { - MP4::Item list; - #define SET( keyName, metaName ) \ -- if( tag->itemListMap().contains(keyName) ) \ -+ if( tag->contains(keyName) ) \ - { \ -- list = tag->itemListMap()[keyName]; \ -+ list = tag->item(keyName); \ - vlc_meta_Set##metaName( p_meta, list.toStringList().front().toCString( true ) ); \ - } - #define SET_EXTRA( keyName, metaName ) \ -- if( tag->itemListMap().contains(keyName) ) \ -+ if( tag->contains(keyName) ) \ - { \ -- list = tag->itemListMap()[keyName]; \ -+ list = tag->item(keyName); \ - vlc_meta_AddExtra( p_meta, metaName, list.toStringList().front().toCString( true ) ); \ - } - -@@ -824,9 +856,9 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_meta - #undef SET - #undef SET_EXTRA - -- if( tag->itemListMap().contains("covr") ) -+ if( tag->contains("covr") ) - { -- MP4::CoverArtList list = tag->itemListMap()["covr"].toCoverArtList(); -+ MP4::CoverArtList list = tag->item("covr").toCoverArtList(); - const char *psz_format = list[0].format() == MP4::CoverArt::PNG ? "image/png" : "image/jpeg"; - - msg_Dbg( p_demux_meta, "Found embedded art (%s) is %i bytes", -@@ -1337,7 +1369,11 @@ static int WriteMeta( vlc_object_t *p_this ) - if( RIFF::AIFF::File* riff_aiff = dynamic_cast(f.file()) ) - WriteMetaToId3v2( riff_aiff->tag(), p_item ); - else if( RIFF::WAV::File* riff_wav = dynamic_cast(f.file()) ) -+#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) -+ WriteMetaToId3v2( riff_wav->ID3v2Tag(), p_item ); -+#else - WriteMetaToId3v2( riff_wav->tag(), p_item ); -+#endif - } - else if( TrueAudio::File* trueaudio = dynamic_cast(f.file()) ) - { diff --git a/multimedia/vlc/files/vlc-3.0.21-fedora_ffmpeg7-1.patch b/multimedia/vlc/files/vlc-3.0.21-fedora_ffmpeg7-1.patch deleted file mode 100644 index d6df9831ddca..000000000000 --- a/multimedia/vlc/files/vlc-3.0.21-fedora_ffmpeg7-1.patch +++ /dev/null @@ -1,1139 +0,0 @@ -Submitted By: Bruce Dubbs -Date: 2024-05-27 -Initial Package Version: 3.0.20 -Upstream Status: Unknown -Origin: Fedora -Description: Fixes compilation with ffmpeg-7 - -From 965ad6ca875fea94712b4e8b107d0100937dcd4f Mon Sep 17 00:00:00 2001 -From: Steve Lhomme -Date: Fri, 3 Aug 2018 10:59:16 +0200 -Subject: [PATCH] avcodec: remove libavutils checks that are always true based - on configure checks - -We assume we use 55.9.0 and 55.22.101 ---- - modules/codec/avcodec/avcommon_compat.h | 4 ---- - modules/codec/avcodec/chroma.c | 6 ------ - modules/codec/avcodec/encoder.c | 6 +----- - modules/codec/avcodec/va.c | 5 +---- - modules/codec/avcodec/video.c | 12 ++---------- - 5 files changed, 4 insertions(+), 29 deletions(-) - -diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h -index 8f9c12081cf8..afd5cc476f8f 100644 ---- a/modules/codec/avcodec/avcommon_compat.h -+++ b/modules/codec/avcodec/avcommon_compat.h -@@ -91,10 +91,6 @@ - ( (LIBAVUTIL_VERSION_MICRO < 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ - (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) - --#if !LIBAVUTIL_VERSION_CHECK( 52, 11, 0, 32, 100 ) --# define AV_PIX_FMT_FLAG_HWACCEL PIX_FMT_HWACCEL --#endif -- - /* - * AV_PIX_FMT_VAAPI is not introduced in the same major version in libav and FFmpeg: - * - libav: lavu 55.8.0: libav/d264c720f7b74286840719e506daba39f83b438b -diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c -index cd8d714bf295..454a20381e41 100644 ---- a/modules/codec/avcodec/chroma.c -+++ b/modules/codec/avcodec/chroma.c -@@ -145,13 +145,11 @@ static const struct - VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_0BGR32, AV_PIX_FMT_0RGB32, 0x000000ff, 0x0000ff00, 0x00ff0000 ) - #endif - --#if (LIBAVUTIL_VERSION_MICRO == 0 || LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 0, 100 ) ) - #ifdef WORDS_BIGENDIAN - {VLC_CODEC_RGBA64, AV_PIX_FMT_RGBA64BE, 0, 0, 0 }, - #else /* !WORDS_BIGENDIAN */ - {VLC_CODEC_RGBA64, AV_PIX_FMT_RGBA64LE, 0, 0, 0 }, - #endif /* !WORDS_BIGENDIAN */ --#endif - - {VLC_CODEC_RGBA, AV_PIX_FMT_RGBA, 0, 0, 0 }, - {VLC_CODEC_ARGB, AV_PIX_FMT_ARGB, 0, 0, 0 }, -@@ -180,9 +178,7 @@ static const struct - {VLC_CODEC_GBR_PLANAR_16B, AV_PIX_FMT_GBRP16BE, 0, 0, 0 }, - - /* XYZ */ --#if LIBAVUTIL_VERSION_CHECK(52, 10, 0, 25, 100) - {VLC_CODEC_XYZ12, AV_PIX_FMT_XYZ12, 0xfff0, 0xfff0, 0xfff0}, --#endif - { 0, 0, 0, 0, 0 } - }; - -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index a00439e93965..cbe150c7016f 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -48,9 +48,7 @@ - #include "avcodec.h" - #include "avcommon.h" - --#if LIBAVUTIL_VERSION_CHECK( 52,2,6,0,0 ) --# include --#endif -+#include - - #define HURRY_UP_GUARD1 (450000) - #define HURRY_UP_GUARD2 (300000) -@@ -740,7 +738,6 @@ int InitVideoEnc( vlc_object_t *p_this ) - p_context->time_base.num = 1; - p_context->time_base.den = p_context->sample_rate; - p_context->channels = p_enc->fmt_out.audio.i_channels; --#if LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 0) - p_context->channel_layout = channel_mask[p_context->channels][1]; - - /* Setup Channel ordering for multichannel audio -@@ -790,7 +787,6 @@ int InitVideoEnc( vlc_object_t *p_this ) - p_sys->i_channels_to_reorder = - aout_CheckChannelReorder( NULL, pi_order_dst, order_mask, - p_sys->pi_reorder_layout ); --#endif - - if ( p_enc->fmt_out.i_codec == VLC_CODEC_MP4A ) - { -diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c -index d1e3048259be..ecf4e8aa14a1 100644 ---- a/modules/codec/avcodec/va.c -+++ b/modules/codec/avcodec/va.c -@@ -58,7 +58,6 @@ vlc_fourcc_t vlc_va_GetChroma(enum Pixel - } - break; - --#if LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100) - case AV_PIX_FMT_D3D11VA_VLD: - switch (swfmt) - { -@@ -68,8 +67,7 @@ vlc_fourcc_t vlc_va_GetChroma(enum Pixel - return VLC_CODEC_D3D11_OPAQUE; - } - break; --#endif --#if (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 4, 0)) -+ - case AV_PIX_FMT_VDPAU: - switch (swfmt) - { -@@ -86,7 +84,6 @@ vlc_fourcc_t vlc_va_GetChroma(enum Pixel - return 0; - } - break; --#endif - default: - return 0; - } -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index a9d45ba4abe1..3c2b3adb2663 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -39,7 +39,7 @@ - #include - #include - #include --#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) -+#if (LIBAVUTIL_VERSION_MICRO >= 100) - #include - #endif - -@@ -687,15 +687,11 @@ static int ffmpeg_OpenVa(decoder_t *p_de - static const enum PixelFormat hwfmts[] = - { - #ifdef _WIN32 --#if LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100) - AV_PIX_FMT_D3D11VA_VLD, --#endif - AV_PIX_FMT_DXVA2_VLD, - #endif - AV_PIX_FMT_VAAPI, --#if (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 4, 0)) - AV_PIX_FMT_VDPAU, --#endif - AV_PIX_FMT_NONE, - }; - -@@ -995,7 +991,7 @@ static int DecodeSidedata( decoder_t *p_ - decoder_sys_t *p_sys = p_dec->p_sys; - bool format_changed = false; - --#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 16, 101 ) ) -+#if (LIBAVUTIL_VERSION_MICRO >= 100) - #define FROM_AVRAT(default_factor, avrat) \ - (uint64_t)(default_factor) * (avrat).num / (avrat).den - const AVFrameSideData *metadata = --- -GitLab - - -From 16fd46fa506424134beb53ec88be3eea1b42a221 Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka -Date: Wed, 7 Jul 2021 12:37:58 +0000 -Subject: [PATCH] avcodec: remove use of av_init_packet as it is deprecated in - new ffmpeg major version - -av_init_packet is deprecated in new major version of ffmpeg. - -Also use av_packet_free instead of unref. - -Use av_packet_clone and AVPacket * in vlc_av_packet_t. ---- - modules/codec/avcodec/subtitle.c | 4 ---- - 5 files changed, 0 insertions(+), 4 deletions(-) - - -diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c -index a92522e4ed00..4cb920a8f444 100644 ---- a/modules/codec/avcodec/subtitle.c -+++ b/modules/codec/avcodec/subtitle.c -@@ -90,11 +90,7 @@ int InitSubtitleDec(vlc_object_t *obj) - context->extradata_size = 0; - context->extradata = NULL; - --#if LIBAVFORMAT_VERSION_MAJOR >= 59 - context->pkt_timebase=AV_TIME_BASE_Q; --#elif LIBAVFORMAT_VERSION_MICRO >= 100 -- av_codec_set_pkt_timebase(context, AV_TIME_BASE_Q); --#endif - - /* */ - int ret; --- -GitLab - - -From 18e98b8a0c410be5e1e9eac55052fe0c56901759 Mon Sep 17 00:00:00 2001 -From: Marvin Scholz -Date: Tue, 30 Nov 2021 18:20:39 +0100 -Subject: [PATCH] avcommon: remove libav from version check macros - ---- - modules/codec/avcodec/avcommon_compat.h | 29 ++++++++++++------------- - modules/codec/avcodec/fourcc.c | 4 ++-- - modules/codec/avcodec/video.c | 4 ++-- - modules/demux/avformat/mux.c | 10 ++++----- - 5 files changed, 23 insertions(+), 24 deletions(-) - -diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h -index 90de502d99ce..010b570e0820 100644 ---- a/modules/codec/avcodec/avcommon_compat.h -+++ b/modules/codec/avcodec/avcommon_compat.h -@@ -30,13 +30,13 @@ - #ifdef HAVE_LIBAVCODEC_AVCODEC_H - #include - --/* LIBAVCODEC_VERSION_CHECK checks for the right version of libav and FFmpeg -+/* LIBAVCODEC_VERSION_CHECK checks for the right version of FFmpeg - * a is the major version -- * b and c the minor and micro versions of libav -- * d and e the minor and micro versions of FFmpeg */ --#define LIBAVCODEC_VERSION_CHECK( a, b, c, d, e ) \ -- ( (LIBAVCODEC_VERSION_MICRO < 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ -- (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) -+ * b is the minor version -+ * c is the micro version -+ */ -+#define LIBAVCODEC_VERSION_CHECK( a, b, c ) \ -+ (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) - - #ifndef AV_CODEC_FLAG_OUTPUT_CORRUPT - # define AV_CODEC_FLAG_OUTPUT_CORRUPT CODEC_FLAG_OUTPUT_CORRUPT -@@ -83,13 +83,13 @@ - #ifdef HAVE_LIBAVUTIL_AVUTIL_H - # include - --/* LIBAVUTIL_VERSION_CHECK checks for the right version of libav and FFmpeg -+/* LIBAVUTIL_VERSION_CHECK checks for the right version of FFmpeg - * a is the major version -- * b and c the minor and micro versions of libav -- * d and e the minor and micro versions of FFmpeg */ --#define LIBAVUTIL_VERSION_CHECK( a, b, c, d, e ) \ -- ( (LIBAVUTIL_VERSION_MICRO < 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ -- (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) -+ * b is the minor version -+ * c is the micro version -+ */ -+#define LIBAVUTIL_VERSION_CHECK( a, b, c ) \ -+ (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) - - /* - * AV_PIX_FMT_VAAPI is not introduced in the same major version in libav and FFmpeg: -@@ -115,9 +115,8 @@ - #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H - # include - --#define LIBAVFORMAT_VERSION_CHECK( a, b, c, d, e ) \ -- ( (LIBAVFORMAT_VERSION_MICRO < 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \ -- (LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) ) -+#define LIBAVFORMAT_VERSION_CHECK( a, b, c ) \ -+ (LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) - - #endif - -diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c -index de41991ebb51..edab2cbdca8f 100644 ---- a/modules/codec/avcodec/fourcc.c -+++ b/modules/codec/avcodec/fourcc.c -@@ -226,7 +226,7 @@ static const struct vlc_avcodec_fourcc v - { VLC_CODEC_CLLC, AV_CODEC_ID_CLLC }, - { VLC_CODEC_MSS2, AV_CODEC_ID_MSS2 }, - { VLC_CODEC_VP9, AV_CODEC_ID_VP9 }, --#if LIBAVCODEC_VERSION_CHECK( 57, 26, 0, 83, 101 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 83, 101 ) - { VLC_CODEC_AV1, AV_CODEC_ID_AV1 }, - #endif - { VLC_CODEC_ICOD, AV_CODEC_ID_AIC }, -@@ -281,19 +281,19 @@ static const struct vlc_avcodec_fourcc v - /* ffmpeg only: AV_CODEC_ID_SNOW */ - /* ffmpeg only: AV_CODEC_ID_SMVJPEG */ - --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 24, 102 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 24, 102 ) - { VLC_CODEC_CINEFORM, AV_CODEC_ID_CFHD }, - #endif - --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 70, 100 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 70, 100 ) - { VLC_CODEC_PIXLET, AV_CODEC_ID_PIXLET }, - #endif - --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 101 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 71, 101 ) - { VLC_CODEC_SPEEDHQ, AV_CODEC_ID_SPEEDHQ }, - #endif - --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 79, 100 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 79, 100 ) - { VLC_CODEC_FMVC, AV_CODEC_ID_FMVC }, - #endif - }; -@@ -410,7 +410,7 @@ static const struct vlc_avcodec_fourcc a - /* AV_CODEC_ID_WESTWOOD_SND1 */ - { VLC_CODEC_GSM, AV_CODEC_ID_GSM }, - { VLC_CODEC_QDM2, AV_CODEC_ID_QDM2 }, --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 71, 100 ) - { VLC_CODEC_QDMC, AV_CODEC_ID_QDMC }, - #endif - { VLC_CODEC_COOK, AV_CODEC_ID_COOK }, -@@ -478,7 +478,7 @@ static const struct vlc_avcodec_fourcc s - { VLC_CODEC_SSA, AV_CODEC_ID_SSA }, - /* AV_CODEC_ID_MOV_TEXT */ - { VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE }, --#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 ) -+#if LIBAVCODEC_VERSION_CHECK( 57, 71, 100 ) - { VLC_CODEC_BD_TEXT, AV_CODEC_ID_HDMV_TEXT_SUBTITLE }, - #endif - { VLC_CODEC_TELETEXT, AV_CODEC_ID_DVB_TELETEXT }, -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index 594c337486a9..d3ba649f272a 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -257,12 +257,12 @@ static int lavc_GetVideoFormat(decoder_t - case AVCOL_TRC_BT2020_12: - fmt->transfer = TRANSFER_FUNC_BT2020; - break; --#if LIBAVUTIL_VERSION_CHECK( 55, 14, 0, 31, 100) -+#if LIBAVUTIL_VERSION_CHECK( 55, 31, 100) - case AVCOL_TRC_ARIB_STD_B67: - fmt->transfer = TRANSFER_FUNC_ARIB_B67; - break; - #endif --#if LIBAVUTIL_VERSION_CHECK( 55, 17, 0, 37, 100) -+#if LIBAVUTIL_VERSION_CHECK( 55, 37, 100) - case AVCOL_TRC_SMPTE2084: - fmt->transfer = TRANSFER_FUNC_SMPTE_ST2084; - break; -@@ -1302,7 +1302,7 @@ static picture_t *DecodeBlock( decoder_t - } - - /* Compute the PTS */ --#if LIBAVCODEC_VERSION_CHECK(57, 24, 0, 61, 100) -+#if LIBAVCODEC_VERSION_CHECK(57, 61, 100) - # if LIBAVCODEC_VERSION_MICRO >= 100 - vlc_tick_t i_pts = frame->best_effort_timestamp; - # else -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index 52fe7ef7f9eb..b9c434f0814f 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -61,7 +61,7 @@ struct sout_mux_sys_t - bool b_write_header; - bool b_write_keyframe; - bool b_error; --#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) -+#if LIBAVFORMAT_VERSION_CHECK( 57, 40, 100 ) - bool b_header_done; - #endif - }; -@@ -76,7 +76,7 @@ static int Mux ( sout_mux_t * ); - - static int IOWrite( void *opaque, uint8_t *buf, int buf_size ); - static int64_t IOSeek( void *opaque, int64_t offset, int whence ); --#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) -+#if LIBAVFORMAT_VERSION_CHECK( 57, 40, 100 ) - static int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size, - enum AVIODataMarkerType type, int64_t time); - #endif -@@ -159,7 +159,7 @@ int avformat_OpenMux( vlc_object_t *p_th - p_sys->b_write_header = true; - p_sys->b_write_keyframe = false; - p_sys->b_error = false; --#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) -+#if LIBAVFORMAT_VERSION_CHECK( 57, 40, 100 ) - p_sys->io->write_data_type = IOWriteTyped; - p_sys->b_header_done = false; - #endif -@@ -406,7 +406,7 @@ static int MuxBlock( sout_mux_t *p_mux, - return VLC_SUCCESS; - } - --#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) -+#if LIBAVFORMAT_VERSION_CHECK( 57, 40, 100 ) - int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size, - enum AVIODataMarkerType type, int64_t time) - { -@@ -523,7 +523,7 @@ static int IOWrite( void *opaque, uint8_ - - if( p_sys->b_write_header ) - p_buf->i_flags |= BLOCK_FLAG_HEADER; --#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 ) -+#if LIBAVFORMAT_VERSION_CHECK( 57, 40, 100 ) - if( !p_sys->b_header_done ) - p_buf->i_flags |= BLOCK_FLAG_HEADER; - #endif --- -GitLab - - -From 8cf02acd84a1e099e15037d7c1e4dce6e8888df9 Mon Sep 17 00:00:00 2001 -From: Marvin Scholz -Date: Tue, 30 Nov 2021 18:30:28 +0100 -Subject: [PATCH] avcodec: remove LIBAVCODEC_VERSION_MICRO >= 100 checks - -This check was used to distinguish FFmpeg and libav, as libav support -is removed now, this is no longer necessary. ---- - modules/codec/avcodec/avcommon_compat.h | 2 +- - modules/codec/avcodec/directx_va.c | 4 ++-- - modules/codec/avcodec/fourcc.c | 18 +++++++----------- - modules/codec/avcodec/video.c | 11 +---------- - 4 files changed, 11 insertions(+), 24 deletions(-) - -diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h -index 010b570e0820..f56ce84b72db 100644 ---- a/modules/codec/avcodec/avcommon_compat.h -+++ b/modules/codec/avcodec/avcommon_compat.h -@@ -36,7 +36,7 @@ - * c is the micro version - */ - #define LIBAVCODEC_VERSION_CHECK( a, b, c ) \ -- (LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) -+ (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c )) - - #ifndef AV_CODEC_FLAG_OUTPUT_CORRUPT - # define AV_CODEC_FLAG_OUTPUT_CORRUPT CODEC_FLAG_OUTPUT_CORRUPT -diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c -index e240fec1ac51..7d180b574a28 100644 ---- a/modules/codec/avcodec/directx_va.c -+++ b/modules/codec/avcodec/directx_va.c -@@ -274,7 +274,7 @@ static const directx_va_mode_t DXVA_MODE - - /* VPx */ - { "VP8", &DXVA_ModeVP8_VLD, 8, 0, NULL }, --#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 57, 17, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100 -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 57, 17, 100 ) - { "VP9 profile 0", &DXVA_ModeVP9_VLD_Profile0, 8, AV_CODEC_ID_VP9, PROF_VP9_MAIN }, - { "VP9 profile 2", &DXVA_ModeVP9_VLD_10bit_Profile2, 10, AV_CODEC_ID_VP9, PROF_VP9_10 }, - #else -@@ -284,7 +284,7 @@ static const directx_va_mode_t DXVA_MODE - { "VP9 profile Intel", &DXVA_ModeVP9_VLD_Intel, 8, 0, NULL }, - - /* AV1 */ --#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 58, 112, 103 ) && LIBAVCODEC_VERSION_MICRO >= 100 -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 58, 112, 103 ) - { "AV1 Main profile 8", &DXVA_ModeAV1_VLD_Profile0, 8, AV_CODEC_ID_AV1, PROF_AV1_MAIN }, - { "AV1 Main profile 10", &DXVA_ModeAV1_VLD_Profile0, 10, AV_CODEC_ID_AV1, PROF_AV1_MAIN }, - { "AV1 High profile 8", &DXVA_ModeAV1_VLD_Profile1, 8, AV_CODEC_ID_AV1, PROF_AV1_HIGH }, -diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c -index edab2cbdca8f..c14320aa1530 100644 ---- a/modules/codec/avcodec/fourcc.c -+++ b/modules/codec/avcodec/fourcc.c -@@ -182,7 +182,7 @@ static const struct vlc_avcodec_fourcc v - /* AV_CODEC_ID_V210X */ - { VLC_CODEC_TMV, AV_CODEC_ID_TMV }, - { VLC_CODEC_V210, AV_CODEC_ID_V210 }, --#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 50, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100 -+#if LIBAVCODEC_VERSION_CHECK( 54, 50, 100 ) - { VLC_CODEC_VUYA, AV_CODEC_ID_AYUV }, - #endif - /* AV_CODEC_ID_DPX */ -diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index d3ba649f272a..c5385d4574d9 100644 ---- a/modules/codec/avcodec/video.c -+++ b/modules/codec/avcodec/video.c -@@ -196,10 +196,6 @@ static int lavc_GetVideoFormat(decoder_t - { - fmt->i_frame_rate = ctx->framerate.num; - fmt->i_frame_rate_base = ctx->framerate.den; --# if LIBAVCODEC_VERSION_MICRO < 100 -- // for some reason libav don't thinkg framerate presents actually same thing as in ffmpeg -- fmt->i_frame_rate_base *= __MAX(ctx->ticks_per_frame, 1); --# endif - } - else if (ctx->time_base.num > 0 && ctx->time_base.den > 0) - { -@@ -1303,11 +1299,7 @@ static picture_t *DecodeBlock( decoder_t - - /* Compute the PTS */ - #if LIBAVCODEC_VERSION_CHECK(57, 61, 100) --# if LIBAVCODEC_VERSION_MICRO >= 100 - vlc_tick_t i_pts = frame->best_effort_timestamp; --# else -- vlc_tick_t i_pts = frame->pts; --# endif - #else - vlc_tick_t i_pts = frame->pkt_pts; - #endif -@@ -1819,8 +1811,7 @@ no_reuse: - if (!can_hwaccel) - return swfmt; - --#if (LIBAVCODEC_VERSION_MICRO >= 100) \ -- && (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 83, 101)) -+#if LIBAVCODEC_VERSION_CHECK(57, 83, 101) - if (p_context->active_thread_type) - { - msg_Warn(p_dec, "thread type %d: disabling hardware acceleration", --- -GitLab - - -From 29747a8abb98ba53a64aa6761983891eeed2e0e4 Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka -Date: Tue, 4 Jul 2023 16:52:38 +0300 -Subject: [PATCH] avcodec: use p_enc audio channels instead of context channels - in encoder - -Allows to have less conditions in code when adding new ch_layout use ---- - modules/codec/avcodec/encoder.c | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index 48d41fe317cd..0ef334212ba4 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -781,7 +781,7 @@ int InitVideoEnc( vlc_object_t *p_this ) - } - } - } -- if( i_channels_src != p_context->channels ) -+ if( i_channels_src != p_enc->fmt_out.audio.i_channels ) - msg_Err( p_enc, "Channel layout not understood" ); - - p_sys->i_channels_to_reorder = -@@ -887,7 +887,7 @@ int InitVideoEnc( vlc_object_t *p_this ) - if( ret ) - { - if( p_enc->fmt_in.i_cat != AUDIO_ES || -- (p_context->channels <= 2 && i_codec_id != AV_CODEC_ID_MP2 -+ (p_enc->fmt_out.audio.i_channels <= 2 && i_codec_id != AV_CODEC_ID_MP2 - && i_codec_id != AV_CODEC_ID_MP3) ) - errmsg: - { -@@ -912,7 +912,7 @@ errmsg: - goto error; - } - -- if( p_context->channels > 2 ) -+ if( p_enc->fmt_out.audio.i_channels > 2 ) - { - p_context->channels = 2; - p_context->channel_layout = channel_mask[p_context->channels][1]; -@@ -1018,7 +1018,7 @@ errmsg: - p_context->frame_size : - AV_INPUT_BUFFER_MIN_SIZE; - p_sys->i_buffer_out = av_samples_get_buffer_size(NULL, -- p_sys->p_context->channels, p_sys->i_frame_size, -+ p_enc->fmt_out.audio.i_channels, p_sys->i_frame_size, - p_sys->p_context->sample_fmt, DEFAULT_ALIGN); - p_sys->p_buffer = av_malloc( p_sys->i_buffer_out ); - if ( unlikely( p_sys->p_buffer == NULL ) ) -@@ -1268,7 +1268,7 @@ static block_t *handle_delay_buffer( enc - { - block_t *p_block = NULL; - //How much we need to copy from new packet -- const size_t leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes; -+ const size_t leftover = leftover_samples * p_enc->fmt_out.audio.i_channels * p_sys->i_sample_bytes; - - av_frame_unref( p_sys->frame ); - p_sys->frame->format = p_sys->p_context->sample_fmt; -@@ -1291,7 +1291,7 @@ static block_t *handle_delay_buffer( enc - // We need to deinterleave from p_aout_buf to p_buffer the leftover bytes - if( p_sys->b_planar ) - aout_Deinterleave( p_sys->p_interleave_buf, p_sys->p_buffer, -- p_sys->i_frame_size, p_sys->p_context->channels, p_enc->fmt_in.i_codec ); -+ p_sys->i_frame_size, p_enc->fmt_out.audio.i_channels, p_enc->fmt_in.i_codec ); - else - memcpy( p_sys->p_buffer + buffer_delay, p_aout_buf->p_buffer, leftover); - -@@ -1309,7 +1309,7 @@ static block_t *handle_delay_buffer( enc - memset( p_sys->p_buffer + (leftover+buffer_delay), 0, padding_size ); - buffer_delay += padding_size; - } -- if( avcodec_fill_audio_frame( p_sys->frame, p_sys->p_context->channels, -+ if( avcodec_fill_audio_frame( p_sys->frame, p_enc->fmt_out.audio.i_channels, - p_sys->p_context->sample_fmt, p_sys->b_planar ? p_sys->p_interleave_buf : p_sys->p_buffer, - p_sys->i_buffer_out, - DEFAULT_ALIGN) < 0 ) -@@ -1339,7 +1339,7 @@ static block_t *EncodeAudio( encoder_t * - - //i_bytes_left is amount of bytes we get - i_samples_left = p_aout_buf ? p_aout_buf->i_nb_samples : 0; -- buffer_delay = p_sys->i_samples_delay * p_sys->i_sample_bytes * p_sys->p_context->channels; -+ buffer_delay = p_sys->i_samples_delay * p_sys->i_sample_bytes * p_enc->fmt_out.audio.i_channels; - - //p_sys->i_buffer_out = p_sys->i_frame_size * chan * p_sys->i_sample_bytes - //Calculate how many bytes we would need from current buffer to fill frame -@@ -1408,12 +1408,12 @@ static block_t *EncodeAudio( encoder_t * - p_sys->frame->channels = p_sys->p_context->channels; - - const int in_bytes = p_sys->frame->nb_samples * -- p_sys->p_context->channels * p_sys->i_sample_bytes; -+ p_enc->fmt_out.audio.i_channels* p_sys->i_sample_bytes; - - if( p_sys->b_planar ) - { - aout_Deinterleave( p_sys->p_buffer, p_aout_buf->p_buffer, -- p_sys->frame->nb_samples, p_sys->p_context->channels, p_enc->fmt_in.i_codec ); -+ p_sys->frame->nb_samples, p_enc->fmt_out.audio.i_channels, p_enc->fmt_in.i_codec ); - - } - else -@@ -1421,7 +1421,7 @@ static block_t *EncodeAudio( encoder_t * - memcpy(p_sys->p_buffer, p_aout_buf->p_buffer, in_bytes); - } - -- if( avcodec_fill_audio_frame( p_sys->frame, p_sys->p_context->channels, -+ if( avcodec_fill_audio_frame( p_sys->frame, p_enc->fmt_out.audio.i_channels, - p_sys->p_context->sample_fmt, - p_sys->p_buffer, - p_sys->i_buffer_out, -@@ -1447,7 +1447,7 @@ static block_t *EncodeAudio( encoder_t * - if( p_aout_buf->i_nb_samples > 0 ) - { - memcpy( p_sys->p_buffer + buffer_delay, p_aout_buf->p_buffer, -- p_aout_buf->i_nb_samples * p_sys->i_sample_bytes * p_sys->p_context->channels); -+ p_aout_buf->i_nb_samples * p_sys->i_sample_bytes * p_enc->fmt_out.audio.i_channels); - p_sys->i_samples_delay += p_aout_buf->i_nb_samples; - } - --- -GitLab - - -From c4302ca59dd79efd7208a45a3fcdc44388fd03a8 Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka -Date: Tue, 4 Jul 2023 16:53:43 +0300 -Subject: [PATCH] avcodec: add handling of new ch_layout in audio encoder - -conditioned to avcodec version where is it added ---- - modules/codec/avcodec/encoder.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index 0ef334212ba4..38a8437261dc 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -914,8 +914,12 @@ errmsg: - - if( p_enc->fmt_out.audio.i_channels > 2 ) - { -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+ av_channel_layout_default( &p_context->ch_layout, 2 ); -+#else - p_context->channels = 2; - p_context->channel_layout = channel_mask[p_context->channels][1]; -+#endif - - /* Change fmt_in in order to ask for a channels conversion */ - p_enc->fmt_in.audio.i_channels = -@@ -1273,8 +1277,12 @@ static block_t *handle_delay_buffer( enc - av_frame_unref( p_sys->frame ); - p_sys->frame->format = p_sys->p_context->sample_fmt; - p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay; -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+ av_channel_layout_copy(&p_sys->frame->ch_layout, &p_sys->p_context->ch_layout); -+#else - p_sys->frame->channel_layout = p_sys->p_context->channel_layout; - p_sys->frame->channels = p_sys->p_context->channels; -+#endif - - p_sys->frame->pts = date_Get( &p_sys->buffer_date ) * p_sys->p_context->time_base.den / - CLOCK_FREQ / p_sys->p_context->time_base.num; -@@ -1404,8 +1412,12 @@ static block_t *EncodeAudio( encoder_t * - p_sys->frame->pts = date_Get( &p_sys->buffer_date ) * p_sys->p_context->time_base.den / - CLOCK_FREQ / p_sys->p_context->time_base.num; - -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+ av_channel_layout_copy(&p_sys->frame->ch_layout, &p_sys->p_context->ch_layout); -+#else - p_sys->frame->channel_layout = p_sys->p_context->channel_layout; - p_sys->frame->channels = p_sys->p_context->channels; -+#endif - - const int in_bytes = p_sys->frame->nb_samples * - p_enc->fmt_out.audio.i_channels* p_sys->i_sample_bytes; --- -GitLab - - -From b73dc8841d999c6be9de718cd2cd3aeb13279792 Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka -Date: Tue, 4 Jul 2023 16:55:28 +0300 -Subject: [PATCH] avcodec: use ch_layout for channel layout in audio encoder - -channels and channel_layout has been deprecated in FFMPEG 5.1 and will be removed eventually - -also always create the mapping, as ch_layout is always there ---- - modules/codec/avcodec/encoder.c | 46 +++++++++++++-------------------- - 1 file changed, 18 insertions(+), 28 deletions(-) - -diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c -index 38a8437261dc..f8bd2bbf939e 100644 ---- a/modules/codec/avcodec/encoder.c -+++ b/modules/codec/avcodec/encoder.c -@@ -179,6 +179,7 @@ static const uint64_t pi_channels_map[][ - { AV_CH_STEREO_RIGHT, 0 }, - }; - -+#if !LIBAVCODEC_VERSION_CHECK(59, 24, 100) - static const uint32_t channel_mask[][2] = { - {0,0}, - {AOUT_CHAN_CENTER, AV_CH_LAYOUT_MONO}, -@@ -191,6 +192,7 @@ static const uint32_t channel_mask[][2] - {AOUT_CHANS_7_1, AV_CH_LAYOUT_7POINT1}, - {AOUT_CHANS_8_1, AV_CH_LAYOUT_OCTAGONAL}, - }; -+#endif - - static const char *const ppsz_enc_options[] = { - "keyint", "bframes", "vt", "qmin", "qmax", "codec", "hq", -@@ -737,48 +739,36 @@ int InitVideoEnc( vlc_object_t *p_this ) - date_Set( &p_sys->buffer_date, AV_NOPTS_VALUE ); - p_context->time_base.num = 1; - p_context->time_base.den = p_context->sample_rate; -- p_context->channels = p_enc->fmt_out.audio.i_channels; -- p_context->channel_layout = channel_mask[p_context->channels][1]; - -- /* Setup Channel ordering for multichannel audio -+ /* Setup Channel ordering for audio - * as VLC channel order isn't same as libavcodec expects - */ - - p_sys->i_channels_to_reorder = 0; - -- /* Specified order -+ /* Create channel layout for avcodec - * Copied from audio.c - */ -- const unsigned i_order_max = 8 * sizeof(p_context->channel_layout); - uint32_t pi_order_dst[AOUT_CHAN_MAX] = { }; - uint32_t order_mask = 0; - int i_channels_src = 0; - -- if( p_context->channel_layout ) -- { -- msg_Dbg( p_enc, "Creating channel order for reordering"); -- for( unsigned i = 0; i < sizeof(pi_channels_map)/sizeof(*pi_channels_map); i++ ) -- { -- if( p_context->channel_layout & pi_channels_map[i][0] ) -- { -- msg_Dbg( p_enc, "%d %"PRIx64" mapped to %"PRIx64"", i_channels_src, pi_channels_map[i][0], pi_channels_map[i][1]); -- pi_order_dst[i_channels_src++] = pi_channels_map[i][1]; -- order_mask |= pi_channels_map[i][1]; -- } -- } -- } -- else -+ msg_Dbg( p_enc, "Creating channel order for reordering"); -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+ av_channel_layout_default( &p_context->ch_layout, p_enc->fmt_out.audio.i_channels ); -+ uint64_t channel_mask = p_context->ch_layout.u.mask; -+#else -+ p_context->channels = p_enc->fmt_out.audio.i_channels; -+ p_context->channel_layout = channel_mask[p_context->channels][1]; -+ uint64_t channel_mask = p_context->channel_layout; -+#endif -+ for( unsigned i = 0; i < sizeof(pi_channels_map)/sizeof(*pi_channels_map); i++ ) - { -- msg_Dbg( p_enc, "Creating default channel order for reordering"); -- /* Create default order */ -- for( unsigned int i = 0; i < __MIN( i_order_max, (unsigned)p_sys->p_context->channels ); i++ ) -+ if( channel_mask & pi_channels_map[i][0] ) - { -- if( i < sizeof(pi_channels_map)/sizeof(*pi_channels_map) ) -- { -- msg_Dbg( p_enc, "%d channel is %"PRIx64"", i_channels_src, pi_channels_map[i][1]); -- pi_order_dst[i_channels_src++] = pi_channels_map[i][1]; -- order_mask |= pi_channels_map[i][1]; -- } -+ msg_Dbg( p_enc, "%d %"PRIx64" mapped to %"PRIx64"", i_channels_src, pi_channels_map[i][0], pi_channels_map[i][1]); -+ pi_order_dst[i_channels_src++] = pi_channels_map[i][1]; -+ order_mask |= pi_channels_map[i][1]; - } - } - if( i_channels_src != p_enc->fmt_out.audio.i_channels ) --- -GitLab - - -From bddf5ba19111d1cc4463d9876c4bc4ba75f82d7f Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka -Date: Wed, 5 Jul 2023 12:51:34 +0300 -Subject: [PATCH] avcodec: use p_dec->fmt_out instead of context channels on - audio channel-count - -reduces the need of ifdefs when adding ch_layout support ---- - modules/codec/avcodec/audio.c | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index 0937641f21ae..5044e1556231 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -484,15 +484,15 @@ static block_t * ConvertAVFrame( decoder - /* Interleave audio if required */ - if( av_sample_fmt_is_planar( ctx->sample_fmt ) ) - { -- p_block = block_Alloc(frame->linesize[0] * ctx->channels); -+ p_block = block_Alloc(frame->linesize[0] * p_dec->fmt_out.audio.i_channels ); - if ( likely(p_block) ) - { -- const void *planes[ctx->channels]; -- for (int i = 0; i < ctx->channels; i++) -+ const void *planes[p_dec->fmt_out.audio.i_channels]; -+ for (int i = 0; i < p_dec->fmt_out.audio.i_channels; i++) - planes[i] = frame->extended_data[i]; - - aout_Interleave(p_block->p_buffer, planes, frame->nb_samples, -- ctx->channels, p_dec->fmt_out.audio.i_format); -+ p_dec->fmt_out.audio.i_channels, p_dec->fmt_out.audio.i_format); - p_block->i_nb_samples = frame->nb_samples; - } - av_frame_free(&frame); -@@ -511,7 +511,7 @@ static block_t * ConvertAVFrame( decoder - { - aout_ChannelExtract( p_buffer->p_buffer, - p_dec->fmt_out.audio.i_channels, -- p_block->p_buffer, ctx->channels, -+ p_block->p_buffer, p_dec->fmt_out.audio.i_channels, - p_block->i_nb_samples, p_sys->pi_extraction, - p_dec->fmt_out.audio.i_bitspersample ); - p_buffer->i_nb_samples = p_block->i_nb_samples; -@@ -600,13 +600,13 @@ static void SetupOutputFormat( decoder_t - if( channel_layout ) - { - for( unsigned i = 0; i < i_order_max -- && i_channels_src < p_sys->p_context->channels; i++ ) -+ && i_channels_src < p_dec->fmt_out.audio.i_channels; i++ ) - { - if( channel_layout & pi_channels_map[i][0] ) - pi_order_src[i_channels_src++] = pi_channels_map[i][1]; - } - -- if( i_channels_src != p_sys->p_context->channels && b_trust ) -+ if( i_channels_src != p_dec->fmt_out.audio.i_channels && b_trust ) - msg_Err( p_dec, "Channel layout not understood" ); - - /* Detect special dual mono case */ --- -GitLab - -From 496f0f2a659c1339d1e37330d446e9b6ce96e76b Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka -Date: Wed, 5 Jul 2023 13:33:09 +0300 -Subject: [PATCH] avcodec: audio decoder to use ch_layout - ---- - modules/codec/avcodec/audio.c | 42 ++++++++++++++++++++++++++++------- - 1 file changed, 34 insertions(+), 8 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index 5044e1556231..2c85d83005c5 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -139,7 +139,11 @@ static int OpenAudioCodec( decoder_t *p_ - } - - ctx->sample_rate = p_dec->fmt_in.audio.i_rate; -- ctx->channels = p_dec->fmt_in.audio.i_channels; -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+ av_channel_layout_default( &ctx->ch_layout, p_dec->fmt_in.audio.i_channels ); -+#else -+ ctx->channels = p_dec->fmt_in.audio.i_channels; -+#endif - ctx->block_align = p_dec->fmt_in.audio.i_blockalign; - ctx->bit_rate = p_dec->fmt_in.i_bitrate; - ctx->bits_per_coded_sample = p_dec->fmt_in.audio.i_bitspersample; -@@ -395,12 +399,17 @@ static int DecodeBlock( decoder_t *p_dec - ret = avcodec_receive_frame( ctx, frame ); - if( ret == 0 ) - { -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+ int channels = frame->ch_layout.nb_channels; -+#else -+ int channels = ctx->channels; -+#endif - /* checks and init from first decoded frame */ -- if( ctx->channels <= 0 || ctx->channels > INPUT_CHAN_MAX -+ if( channels <= 0 || channels > INPUT_CHAN_MAX - || ctx->sample_rate <= 0 ) - { - msg_Warn( p_dec, "invalid audio properties channels count %d, sample rate %d", -- ctx->channels, ctx->sample_rate ); -+ channels, ctx->sample_rate ); - goto drop; - } - else if( p_dec->fmt_out.audio.i_rate != (unsigned int)ctx->sample_rate ) -@@ -580,6 +589,16 @@ static void SetupOutputFormat( decoder_t - p_dec->fmt_out.audio.i_rate = p_sys->p_context->sample_rate; - - /* */ -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+ if( p_sys->i_previous_channels == p_sys->p_context->ch_layout.nb_channels && -+ p_sys->i_previous_layout == p_sys->p_context->ch_layout.u.mask ) -+ return; -+ if( b_trust ) -+ { -+ p_sys->i_previous_channels = p_sys->p_context->ch_layout.nb_channels; -+ p_sys->i_previous_layout = p_sys->p_context->ch_layout.u.mask; -+ } -+#else - if( p_sys->i_previous_channels == p_sys->p_context->channels && - p_sys->i_previous_layout == p_sys->p_context->channel_layout ) - return; -@@ -588,25 +607,32 @@ static void SetupOutputFormat( decoder_t - p_sys->i_previous_channels = p_sys->p_context->channels; - p_sys->i_previous_layout = p_sys->p_context->channel_layout; - } -+#endif - -- const unsigned i_order_max = sizeof(pi_channels_map)/sizeof(*pi_channels_map); -- uint32_t pi_order_src[i_order_max]; -+ uint32_t pi_order_src[AOUT_CHAN_MAX] = { 0 }; - - int i_channels_src = 0; -- int64_t channel_layout = -+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) -+ uint64_t channel_layout_mask = p_sys->p_context->ch_layout.u.mask; -+ int channel_count = p_sys->p_context->ch_layout.nb_channels; -+#else -+ uint64_t channel_layout_mask = - p_sys->p_context->channel_layout ? p_sys->p_context->channel_layout : - av_get_default_channel_layout( p_sys->p_context->channels ); -+ (uint64_t)av_get_default_channel_layout( p_sys->p_context->channels ); -+ int channel_count = p_sys->p_context->channels; -+#endif - -- if( channel_layout ) -+ if( channel_layout_mask ) - { -- for( unsigned i = 0; i < i_order_max -- && i_channels_src < p_dec->fmt_out.audio.i_channels; i++ ) -+ for( unsigned i = 0; pi_channels_map[i][0] -+ && i_channels_src < channel_count; i++ ) - { -- if( channel_layout & pi_channels_map[i][0] ) -+ if( channel_layout_mask & pi_channels_map[i][0] ) - pi_order_src[i_channels_src++] = pi_channels_map[i][1]; - } - -- if( i_channels_src != p_dec->fmt_out.audio.i_channels && b_trust ) -+ if( i_channels_src != channel_count && b_trust ) - msg_Err( p_dec, "Channel layout not understood" ); - - /* Detect special dual mono case */ -@@ -638,7 +664,7 @@ static void SetupOutputFormat( decoder_t - { - msg_Warn( p_dec, "no channel layout found"); - p_dec->fmt_out.audio.i_physical_channels = 0; -- p_dec->fmt_out.audio.i_channels = p_sys->p_context->channels; -+ p_dec->fmt_out.audio.i_channels = channel_count; - } - - aout_FormatPrepare( &p_dec->fmt_out.audio ); --- -GitLab - -From 0ff86bf8a28a080340f600cb8561815fc43e3b4a Mon Sep 17 00:00:00 2001 -From: Ilkka Ollakka -Date: Wed, 5 Jul 2023 15:09:57 +0300 -Subject: [PATCH] avcodec/audio: make channel mapping array 0 terminated - -Also change pi_channels_src to be only AOUT_CHAN_MAX instead of same -size as mapping array. ---- - modules/codec/avcodec/audio.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c -index 2c85d83005c5..d0c8bae750b2 100644 ---- a/modules/codec/avcodec/audio.c -+++ b/modules/codec/avcodec/audio.c -@@ -577,6 +577,7 @@ static const uint64_t pi_channels_map[][ - { AV_CH_TOP_BACK_RIGHT, 0 }, - { AV_CH_STEREO_LEFT, 0 }, - { AV_CH_STEREO_RIGHT, 0 }, -+ { 0, 0 }, - }; - - static void SetupOutputFormat( decoder_t *p_dec, bool b_trust ) --- -GitLab - - -From 1a57633d1820eb218771489505876fa55f8a8847 Mon Sep 17 00:00:00 2001 -From: Francois Cartegnie -Date: Tue, 23 Apr 2024 13:13:30 +0700 -Subject: [PATCH 1/4] codec: avcodec: map AYUV as RAWVIDEO with ffmpeg 6.0 - ---- - modules/codec/avcodec/fourcc.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c -index de7b9e1377bd..4ce2584bd303 100644 ---- a/modules/codec/avcodec/fourcc.c -+++ b/modules/codec/avcodec/fourcc.c -@@ -182,7 +182,9 @@ static const struct vlc_avcodec_fourcc v - /* AV_CODEC_ID_V210X */ - { VLC_CODEC_TMV, AV_CODEC_ID_TMV }, - { VLC_CODEC_V210, AV_CODEC_ID_V210 }, --#if LIBAVCODEC_VERSION_CHECK( 54, 50, 100 ) -+#if LIBAVCODEC_VERSION_CHECK( 59, 42, 102 ) -+ { VLC_CODEC_VUYA, AV_CODEC_ID_RAWVIDEO }, -+#else - { VLC_CODEC_VUYA, AV_CODEC_ID_AYUV }, - #endif - /* AV_CODEC_ID_DPX */ --- -GitLab - - -From 3ecdd252b42dca492c79470535703eae0dfc1093 Mon Sep 17 00:00:00 2001 -From: Francois Cartegnie -Date: Tue, 23 Apr 2024 13:14:53 +0700 -Subject: [PATCH 2/4] demux/mux: avformat: use ch_layout from ffmpeg 5.1 - ---- - modules/demux/avformat/demux.c | 4 ++++ - modules/demux/avformat/mux.c | 4 ++++ - 2 files changed, 8 insertions(+) - -diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c -index 743e0534901c..87f5b41c0d82 100644 ---- a/modules/demux/avformat/demux.c -+++ b/modules/demux/avformat/demux.c -@@ -401,7 +401,11 @@ int avformat_OpenDemux( vlc_object_t *p_ - es_format_Init( &es_fmt, AUDIO_ES, fcc ); - es_fmt.i_original_fourcc = CodecTagToFourcc( cp->codec_tag ); - es_fmt.i_bitrate = cp->bit_rate; -+#if LIBAVUTIL_VERSION_CHECK( 57, 28, 100 ) -+ es_fmt.audio.i_channels = cp->ch_layout.nb_channels; -+#else - es_fmt.audio.i_channels = cp->channels; -+#endif - es_fmt.audio.i_rate = cp->sample_rate; - es_fmt.audio.i_bitspersample = cp->bits_per_coded_sample; - es_fmt.audio.i_blockalign = cp->block_align; -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index 55fc891437c7..0e87942aa76a 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -267,7 +267,11 @@ static int AddStream( sout_mux_t *p_mux, - { - case AUDIO_ES: - codecpar->codec_type = AVMEDIA_TYPE_AUDIO; -+#if LIBAVUTIL_VERSION_CHECK( 57, 28, 100 ) -+ av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels ); -+#else - codecpar->channels = fmt->audio.i_channels; -+#endif - codecpar->sample_rate = fmt->audio.i_rate; - stream->time_base = (AVRational){1, codecpar->sample_rate}; - if (fmt->i_bitrate == 0) { --- -GitLab - - -From 1c15a5e183df7e292afd27795548d3c2254a9bbd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= -Date: Mon, 6 May 2024 12:15:40 +0200 -Subject: [PATCH] demux/mux: avformat: Constify the buffer pointees - -in the write_packet from ffmpeg 6.1 - -The deprecated FF_API_AVIO_WRITE_NONCONST was removed in ffmpeg 7.0. - -Ref: -https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/2a68d945cd74265bb71c3d38b7a2e7f7d7e87be5 -https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/02aea61d69d8f81bc285e2131bf25f96a3e27feb ---- - modules/demux/avformat/mux.c | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - -diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c -index 0e87942aa76a..390aa3cb4dfd 100644 ---- a/modules/demux/avformat/mux.c -+++ b/modules/demux/avformat/mux.c -@@ -75,9 +75,16 @@ static int AddStream( sout_mux_t *, sout_input_t * ); - static void DelStream( sout_mux_t *, sout_input_t * ); - static int Mux ( sout_mux_t * ); - -+#if LIBAVFORMAT_VERSION_CHECK( 61, 01, 100 ) -+static int IOWrite( void *opaque, const uint8_t *buf, int buf_size ); -+#else - static int IOWrite( void *opaque, uint8_t *buf, int buf_size ); -+#endif - static int64_t IOSeek( void *opaque, int64_t offset, int whence ); --#if LIBAVFORMAT_VERSION_CHECK( 57, 40, 100 ) -+#if LIBAVFORMAT_VERSION_CHECK( 61, 01, 100 ) -+static int IOWriteTyped(void *opaque, const uint8_t *buf, int buf_size, -+ enum AVIODataMarkerType type, int64_t time); -+#elif LIBAVFORMAT_VERSION_CHECK( 57, 40, 100 ) - static int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size, - enum AVIODataMarkerType type, int64_t time); - #endif -@@ -436,8 +443,13 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input ) - } - - #if LIBAVFORMAT_VERSION_CHECK( 57, 40, 100 ) -+#if LIBAVFORMAT_VERSION_CHECK( 61, 01, 100 ) -+int IOWriteTyped(void *opaque, const uint8_t *buf, int buf_size, -+ enum AVIODataMarkerType type, int64_t time) -+#else - int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size, - enum AVIODataMarkerType type, int64_t time) -+#endif - { - VLC_UNUSED(time); - -@@ -533,7 +545,11 @@ static int Control( sout_mux_t *p_mux, int i_query, va_list args ) - /***************************************************************************** - * I/O wrappers for libavformat - *****************************************************************************/ -+#if LIBAVFORMAT_VERSION_CHECK( 61, 01, 100 ) -+static int IOWrite( void *opaque, const uint8_t *buf, int buf_size ) -+#else - static int IOWrite( void *opaque, uint8_t *buf, int buf_size ) -+#endif - { - sout_mux_t *p_mux = opaque; - sout_mux_sys_t *p_sys = p_mux->p_sys; --- -GitLab diff --git a/multimedia/vlc/files/vlc-3.0.21-ffmpeg8-1.patch b/multimedia/vlc/files/vlc-3.0.21-ffmpeg8-1.patch deleted file mode 100644 index a523b04968f3..000000000000 --- a/multimedia/vlc/files/vlc-3.0.21-ffmpeg8-1.patch +++ /dev/null @@ -1,393 +0,0 @@ -Submitted By: Joe Locash -Date: 2025-11-19 -Initial Package Version: 3.0.21 -Upstream Status: Unknown -Origin: Upstream -Description: Fixes compilation with ffmpeg-8.0 - -diff -Nuarp vlc-3.0.21.orig/modules/codec/avcodec/audio.c vlc-3.0.21/modules/codec/avcodec/audio.c ---- vlc-3.0.21.orig/modules/codec/avcodec/audio.c 2025-11-17 18:16:27.482219213 -0500 -+++ vlc-3.0.21/modules/codec/avcodec/audio.c 2025-11-17 18:17:09.717861987 -0500 -@@ -44,6 +44,12 @@ - #include - - -+#if ! LIBAVCODEC_VERSION_CHECK(61, 33, 102) // Compatibility for profiles <= FFMPEG 8 -+# define AV_PROFILE_UNKNOWN FF_PROFILE_UNKNOWN -+# define AV_LEVEL_UNKNOWN FF_LEVEL_UNKNOWN -+# define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE -+#endif -+ - /***************************************************************************** - * decoder_sys_t : decoder descriptor - *****************************************************************************/ -@@ -101,7 +107,7 @@ static void InitDecoderConfig( decoder_t - if( i_size > 0 ) - { - p_context->extradata = -- av_malloc( i_size + FF_INPUT_BUFFER_PADDING_SIZE ); -+ av_malloc( i_size + AV_INPUT_BUFFER_PADDING_SIZE ); - if( p_context->extradata ) - { - uint8_t *p_dst = p_context->extradata; -@@ -109,7 +115,7 @@ static void InitDecoderConfig( decoder_t - p_context->extradata_size = i_size; - - memcpy( &p_dst[0], &p_src[i_offset], i_size ); -- memset( &p_dst[i_size], 0, FF_INPUT_BUFFER_PADDING_SIZE ); -+ memset( &p_dst[i_size], 0, AV_INPUT_BUFFER_PADDING_SIZE ); - } - } - } -@@ -266,9 +272,9 @@ int InitAudioDec( vlc_object_t *obj ) - p_dec->pf_flush = Flush; - - /* XXX: Writing input format makes little sense. */ -- if( avctx->profile != FF_PROFILE_UNKNOWN ) -+ if( avctx->profile != AV_PROFILE_UNKNOWN ) - p_dec->fmt_in.i_profile = avctx->profile; -- if( avctx->level != FF_LEVEL_UNKNOWN ) -+ if( avctx->level != AV_LEVEL_UNKNOWN ) - p_dec->fmt_in.i_level = avctx->level; - - return VLC_SUCCESS; -@@ -348,11 +354,11 @@ static int DecodeBlock( decoder_t *p_dec - - if( (p_block->i_flags & BLOCK_FLAG_PRIVATE_REALLOCATED) == 0 ) - { -- *pp_block = p_block = block_Realloc( p_block, 0, p_block->i_buffer + FF_INPUT_BUFFER_PADDING_SIZE ); -+ *pp_block = p_block = block_Realloc( p_block, 0, p_block->i_buffer + AV_INPUT_BUFFER_PADDING_SIZE ); - if( !p_block ) - goto end; -- p_block->i_buffer -= FF_INPUT_BUFFER_PADDING_SIZE; -- memset( &p_block->p_buffer[p_block->i_buffer], 0, FF_INPUT_BUFFER_PADDING_SIZE ); -+ p_block->i_buffer -= AV_INPUT_BUFFER_PADDING_SIZE; -+ memset( &p_block->p_buffer[p_block->i_buffer], 0, AV_INPUT_BUFFER_PADDING_SIZE ); - - p_block->i_flags |= BLOCK_FLAG_PRIVATE_REALLOCATED; - } -diff -Nuarp vlc-3.0.21.orig/modules/codec/avcodec/avcommon_compat.h vlc-3.0.21/modules/codec/avcodec/avcommon_compat.h ---- vlc-3.0.21.orig/modules/codec/avcodec/avcommon_compat.h 2025-11-17 18:16:27.478199137 -0500 -+++ vlc-3.0.21/modules/codec/avcodec/avcommon_compat.h 2025-11-17 18:17:09.718111806 -0500 -@@ -53,8 +53,11 @@ - #ifndef AV_CODEC_FLAG2_FAST - # define AV_CODEC_FLAG2_FAST CODEC_FLAG2_FAST - #endif --#ifndef FF_INPUT_BUFFER_PADDING_SIZE --# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE -+#if ! LIBAVCODEC_VERSION_CHECK(61, 33, 102) // Compatibility for profiles <= FFMPEG 8 -+# ifndef FF_INPUT_BUFFER_PADDING_SIZE -+# define FF_INPUT_BUFFER_PADDING_SIZE 64 -+# endif -+#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE - #endif - #ifndef AV_CODEC_FLAG_INTERLACED_DCT - # define AV_CODEC_FLAG_INTERLACED_DCT CODEC_FLAG_INTERLACED_DCT -@@ -72,7 +75,11 @@ - # define AV_CODEC_CAP_SMALL_LAST_FRAME CODEC_CAP_SMALL_LAST_FRAME - #endif - #ifndef AV_INPUT_BUFFER_MIN_SIZE --# define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE -+# ifdef FF_MIN_BUFFER_SIZE -+# define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE -+# else -+# define AV_INPUT_BUFFER_MIN_SIZE 16384 // removed with ffmpeg 8 -+# endif - #endif - #ifndef FF_MAX_B_FRAMES - # define FF_MAX_B_FRAMES 16 // FIXME: remove this -diff -Nuarp vlc-3.0.21.orig/modules/codec/avcodec/encoder.c vlc-3.0.21/modules/codec/avcodec/encoder.c ---- vlc-3.0.21.orig/modules/codec/avcodec/encoder.c 2025-11-17 18:16:27.481068106 -0500 -+++ vlc-3.0.21/modules/codec/avcodec/encoder.c 2025-11-17 15:11:31.691944598 -0500 -@@ -65,6 +65,17 @@ - # define AVC_MAYBE_CONST - #endif - -+#if ! LIBAVCODEC_VERSION_CHECK(61, 33, 102) // Compatibility for profiles <= FFMPEG 8 -+# define AV_PROFILE_AAC_MAIN FF_PROFILE_AAC_MAIN -+# define AV_PROFILE_AAC_LOW FF_PROFILE_AAC_LOW -+# define AV_PROFILE_AAC_SSR FF_PROFILE_AAC_SSR -+# define AV_PROFILE_AAC_LTP FF_PROFILE_AAC_LTP -+# define AV_PROFILE_AAC_HE_V2 FF_PROFILE_AAC_HE_V2 -+# define AV_PROFILE_AAC_HE FF_PROFILE_AAC_HE -+# define AV_PROFILE_AAC_LD FF_PROFILE_AAC_LD -+# define AV_PROFILE_AAC_ELD FF_PROFILE_AAC_ELD -+#endif -+ - /***************************************************************************** - * Local prototypes - *****************************************************************************/ -@@ -468,30 +479,30 @@ int InitVideoEnc( vlc_object_t *p_this ) - psz_val = var_GetString( p_enc, ENC_CFG_PREFIX "aac-profile" ); - /* libavcodec uses faac encoder atm, and it has issues with - * other than low-complexity profile, so default to that */ -- p_sys->i_aac_profile = FF_PROFILE_AAC_LOW; -+ p_sys->i_aac_profile = AV_PROFILE_AAC_LOW; - if( psz_val && *psz_val ) - { - if( !strncmp( psz_val, "main", 4 ) ) -- p_sys->i_aac_profile = FF_PROFILE_AAC_MAIN; -+ p_sys->i_aac_profile = AV_PROFILE_AAC_MAIN; - else if( !strncmp( psz_val, "low", 3 ) ) -- p_sys->i_aac_profile = FF_PROFILE_AAC_LOW; -+ p_sys->i_aac_profile = AV_PROFILE_AAC_LOW; - else if( !strncmp( psz_val, "ssr", 3 ) ) -- p_sys->i_aac_profile = FF_PROFILE_AAC_SSR; -+ p_sys->i_aac_profile = AV_PROFILE_AAC_SSR; - else if( !strncmp( psz_val, "ltp", 3 ) ) -- p_sys->i_aac_profile = FF_PROFILE_AAC_LTP; -+ p_sys->i_aac_profile = AV_PROFILE_AAC_LTP; - /* These require libavcodec with libfdk-aac */ - else if( !strncmp( psz_val, "hev2", 4 ) ) -- p_sys->i_aac_profile = FF_PROFILE_AAC_HE_V2; -+ p_sys->i_aac_profile = AV_PROFILE_AAC_HE_V2; - else if( !strncmp( psz_val, "hev1", 4 ) ) -- p_sys->i_aac_profile = FF_PROFILE_AAC_HE; -+ p_sys->i_aac_profile = AV_PROFILE_AAC_HE; - else if( !strncmp( psz_val, "ld", 2 ) ) -- p_sys->i_aac_profile = FF_PROFILE_AAC_LD; -+ p_sys->i_aac_profile = AV_PROFILE_AAC_LD; - else if( !strncmp( psz_val, "eld", 3 ) ) -- p_sys->i_aac_profile = FF_PROFILE_AAC_ELD; -+ p_sys->i_aac_profile = AV_PROFILE_AAC_ELD; - else - { - msg_Warn( p_enc, "unknown AAC profile requested, setting it to low" ); -- p_sys->i_aac_profile = FF_PROFILE_AAC_LOW; -+ p_sys->i_aac_profile = AV_PROFILE_AAC_LOW; - } - } - free( psz_val ); -@@ -1217,8 +1228,19 @@ static block_t *EncodeVideo( encoder_t * - frame->pict_type = 0; - - frame->repeat_pict = p_pict->i_nb_fields - 2; -+#if LIBAVUTIL_VERSION_CHECK( 58, 7, 100 ) -+ if (p_pict->b_progressive) -+ frame->flags &= ~AV_FRAME_FLAG_INTERLACED; -+ else -+ frame->flags |= AV_FRAME_FLAG_INTERLACED; -+ if (p_pict->b_top_field_first) -+ frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; -+ else -+ frame->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST; -+#else - frame->interlaced_frame = !p_pict->b_progressive; - frame->top_field_first = !!p_pict->b_top_field_first; -+#endif - - frame->format = p_sys->p_context->pix_fmt; - frame->width = p_sys->p_context->width; -@@ -1473,9 +1495,8 @@ void EndVideoEnc( vlc_object_t *p_this ) - av_frame_free( &p_sys->frame ); - - vlc_avcodec_lock(); -- avcodec_close( p_sys->p_context ); -- vlc_avcodec_unlock(); - avcodec_free_context( &p_sys->p_context ); -+ vlc_avcodec_unlock(); - - - av_free( p_sys->p_interleave_buf ); -diff -Nuarp vlc-3.0.21.orig/modules/codec/avcodec/subtitle.c vlc-3.0.21/modules/codec/avcodec/subtitle.c ---- vlc-3.0.21.orig/modules/codec/avcodec/subtitle.c 2025-11-17 18:16:27.475904814 -0500 -+++ vlc-3.0.21/modules/codec/avcodec/subtitle.c 2025-11-17 18:17:09.718626249 -0500 -@@ -174,11 +174,11 @@ static subpicture_t *DecodeBlock(decoder - *block_ptr = - block = block_Realloc(block, - 0, -- block->i_buffer + FF_INPUT_BUFFER_PADDING_SIZE); -+ block->i_buffer + AV_INPUT_BUFFER_PADDING_SIZE); - if (!block) - return NULL; -- block->i_buffer -= FF_INPUT_BUFFER_PADDING_SIZE; -- memset(&block->p_buffer[block->i_buffer], 0, FF_INPUT_BUFFER_PADDING_SIZE); -+ block->i_buffer -= AV_INPUT_BUFFER_PADDING_SIZE; -+ memset(&block->p_buffer[block->i_buffer], 0, AV_INPUT_BUFFER_PADDING_SIZE); - - /* */ - AVSubtitle subtitle; -diff -Nuarp vlc-3.0.21.orig/modules/codec/avcodec/vaapi.c vlc-3.0.21/modules/codec/avcodec/vaapi.c ---- vlc-3.0.21.orig/modules/codec/avcodec/vaapi.c 2024-06-05 11:56:07.000000000 -0400 -+++ vlc-3.0.21/modules/codec/avcodec/vaapi.c 2025-11-17 18:17:09.718869643 -0500 -@@ -87,9 +87,9 @@ static int GetVaProfile(AVCodecContext * - count = 18; - break; - case AV_CODEC_ID_HEVC: -- if (ctx->profile == FF_PROFILE_HEVC_MAIN) -+ if (ctx->profile == AV_PROFILE_HEVC_MAIN) - i_profile = VAProfileHEVCMain; -- else if (ctx->profile == FF_PROFILE_HEVC_MAIN_10) -+ else if (ctx->profile == AV_PROFILE_HEVC_MAIN_10) - { - i_profile = VAProfileHEVCMain10; - i_vlc_chroma = VLC_CODEC_VAAPI_420_10BPP; -@@ -103,10 +103,10 @@ static int GetVaProfile(AVCodecContext * - count = 5; - break; - case AV_CODEC_ID_VP9: -- if (ctx->profile == FF_PROFILE_VP9_0) -+ if (ctx->profile == AV_PROFILE_VP9_0) - i_profile = VAProfileVP9Profile0; - #if VA_CHECK_VERSION( 0, 39, 0 ) -- else if (ctx->profile == FF_PROFILE_VP9_2) -+ else if (ctx->profile == AV_PROFILE_VP9_2) - { - i_profile = VAProfileVP9Profile2; - i_vlc_chroma = VLC_CODEC_VAAPI_420_10BPP; -diff -Nuarp vlc-3.0.21.orig/modules/codec/avcodec/video.c vlc-3.0.21/modules/codec/avcodec/video.c ---- vlc-3.0.21.orig/modules/codec/avcodec/video.c 2025-11-17 18:16:27.479151968 -0500 -+++ vlc-3.0.21/modules/codec/avcodec/video.c 2025-11-17 15:17:39.571811094 -0500 -@@ -50,6 +50,13 @@ - #include "../../packetizer/av1.h" - #include "../codec/cc.h" - -+#if ! LIBAVCODEC_VERSION_CHECK(61, 33, 102) // Compatibility for profiles <= FFMPEG 8 -+# define AV_PROFILE_UNKNOWN FF_PROFILE_UNKNOWN -+# define AV_LEVEL_UNKNOWN FF_LEVEL_UNKNOWN -+# define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE -+#endif -+ -+ - /***************************************************************************** - * decoder_sys_t : decoder descriptor - *****************************************************************************/ -@@ -200,8 +207,7 @@ static int lavc_GetVideoFormat(decoder_t - else if (ctx->time_base.num > 0 && ctx->time_base.den > 0) - { - fmt->i_frame_rate = ctx->time_base.den; -- fmt->i_frame_rate_base = ctx->time_base.num -- * __MAX(ctx->ticks_per_frame, 1); -+ fmt->i_frame_rate_base = ctx->time_base.num; - } - - /* FIXME we should only set the known values and let the core decide -@@ -323,12 +329,10 @@ static int lavc_UpdateVideoFormat(decode - - /* always have date in fields/ticks units */ - if(dec->p_sys->pts.i_divider_num) -- date_Change(&dec->p_sys->pts, fmt_out.i_frame_rate * -- __MAX(ctx->ticks_per_frame, 1), -+ date_Change(&dec->p_sys->pts, fmt_out.i_frame_rate, - fmt_out.i_frame_rate_base); - else -- date_Init(&dec->p_sys->pts, fmt_out.i_frame_rate * -- __MAX(ctx->ticks_per_frame, 1), -+ date_Init(&dec->p_sys->pts, fmt_out.i_frame_rate, - fmt_out.i_frame_rate_base); - - fmt_out.p_palette = dec->fmt_out.video.p_palette; -@@ -622,9 +626,9 @@ static int InitVideoDecCommon( decoder_t - p_dec->pf_flush = Flush; - - /* XXX: Writing input format makes little sense. */ -- if( p_context->profile != FF_PROFILE_UNKNOWN ) -+ if( p_context->profile != AV_PROFILE_UNKNOWN ) - p_dec->fmt_in.i_profile = p_context->profile; -- if( p_context->level != FF_LEVEL_UNKNOWN ) -+ if( p_context->level != AV_LEVEL_UNKNOWN ) - p_dec->fmt_in.i_level = p_context->level; - return VLC_SUCCESS; - } -@@ -937,9 +941,11 @@ static vlc_tick_t interpolate_next_pts( - p_sys->pts.i_divider_num == 0 ) - return VLC_TICK_INVALID; - -+#if LIBAVCODEC_VERSION_CHECK( 60, 12, 100 ) -+ int i_tick = p_context->codec_descriptor->props & AV_CODEC_PROP_FIELDS ? 2 : 1; -+#else - int i_tick = p_context->ticks_per_frame; -- if( i_tick <= 0 ) -- i_tick = 1; -+#endif - - /* interpolate the next PTS */ - return date_Increment( &p_sys->pts, i_tick + frame->repeat_pict ); -@@ -1179,13 +1185,13 @@ static picture_t *DecodeBlock( decoder_t - eos_spotted = ( p_block->i_flags & BLOCK_FLAG_END_OF_SEQUENCE ) != 0; - - p_block = block_Realloc( p_block, 0, -- p_block->i_buffer + FF_INPUT_BUFFER_PADDING_SIZE ); -+ p_block->i_buffer + AV_INPUT_BUFFER_PADDING_SIZE ); - if( !p_block ) - return NULL; -- p_block->i_buffer -= FF_INPUT_BUFFER_PADDING_SIZE; -+ p_block->i_buffer -= AV_INPUT_BUFFER_PADDING_SIZE; - *pp_block = p_block; - memset( p_block->p_buffer + p_block->i_buffer, 0, -- FF_INPUT_BUFFER_PADDING_SIZE ); -+ AV_INPUT_BUFFER_PADDING_SIZE ); - } - - do -@@ -1414,8 +1420,13 @@ static picture_t *DecodeBlock( decoder_t - /* Hack to force display of still pictures */ - p_pic->b_force = p_sys->b_first_frame; - p_pic->i_nb_fields = 2 + frame->repeat_pict; -+#if LIBAVUTIL_VERSION_CHECK( 58, 7, 100 ) -+ p_pic->b_progressive = !(frame->flags & AV_FRAME_FLAG_INTERLACED); -+ p_pic->b_top_field_first = !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); -+#else - p_pic->b_progressive = !frame->interlaced_frame; - p_pic->b_top_field_first = frame->top_field_first; -+#endif - - if (DecodeSidedata(p_dec, frame, p_pic)) - i_pts = VLC_TICK_INVALID; -@@ -1502,7 +1513,7 @@ static void ffmpeg_InitCodec( decoder_t - p_sys->p_context->extradata_size = i_size + 12; - p = p_sys->p_context->extradata = - av_malloc( p_sys->p_context->extradata_size + -- FF_INPUT_BUFFER_PADDING_SIZE ); -+ AV_INPUT_BUFFER_PADDING_SIZE ); - if( !p ) - return; - -@@ -1539,13 +1550,13 @@ static void ffmpeg_InitCodec( decoder_t - { - p_sys->p_context->extradata_size = i_size; - p_sys->p_context->extradata = -- av_malloc( i_size + FF_INPUT_BUFFER_PADDING_SIZE ); -+ av_malloc( i_size + AV_INPUT_BUFFER_PADDING_SIZE ); - if( p_sys->p_context->extradata ) - { - memcpy( p_sys->p_context->extradata, - p_dec->fmt_in.p_extra, i_size ); - memset( p_sys->p_context->extradata + i_size, -- 0, FF_INPUT_BUFFER_PADDING_SIZE ); -+ 0, AV_INPUT_BUFFER_PADDING_SIZE ); - } - } - } -diff -Nuarp vlc-3.0.21.orig/modules/demux/avformat/demux.c vlc-3.0.21/modules/demux/avformat/demux.c ---- vlc-3.0.21.orig/modules/demux/avformat/demux.c 2025-11-17 18:16:27.482817115 -0500 -+++ vlc-3.0.21/modules/demux/avformat/demux.c 2025-11-17 15:40:29.653691401 -0500 -@@ -112,6 +112,18 @@ static vlc_fourcc_t CodecTagToFourcc( ui - #endif - } - -+static inline void* GetStreamSideData(const AVStream *s, enum AVPacketSideDataType type) -+{ -+#if LIBAVCODEC_VERSION_CHECK( 60, 29, 100 ) -+ const AVCodecParameters *cp = s->codecpar; -+ const AVPacketSideData *psd = -+ av_packet_side_data_get(cp->coded_side_data, cp->nb_coded_side_data, type); -+ return psd ? psd->data : NULL; -+#else -+ return av_stream_get_side_data(s, type, NULL); -+#endif -+} -+ - /***************************************************************************** - * Open - *****************************************************************************/ -@@ -138,7 +150,8 @@ static void get_rotation(es_format_t *fm - else - fmt->video.orientation = ORIENT_NORMAL; - } -- int32_t *matrix = (int32_t *)av_stream_get_side_data(s, AV_PKT_DATA_DISPLAYMATRIX, NULL); -+ -+ int32_t *matrix = GetStreamSideData(s, AV_PKT_DATA_DISPLAYMATRIX); - if( matrix ) { - angle = lround(av_display_rotation_get(matrix)); - diff --git a/multimedia/vlc/files/vlc-3.0.22-ffmpeg8.patch b/multimedia/vlc/files/vlc-3.0.22-ffmpeg8.patch new file mode 100644 index 000000000000..061fa5edff13 --- /dev/null +++ b/multimedia/vlc/files/vlc-3.0.22-ffmpeg8.patch @@ -0,0 +1,324 @@ +From: Steve Lhomme +Date: Mon, 8 Sep 2025 13:55:28 +0200 +Subject: avcodec: encoder: remove AV_INPUT_BUFFER_MIN_SIZE usage + +It's not supported in FFMpeg 8.0 since 60.40.100. + +It used to be used with preallocated packet buffers with +the old encode API, but said API is no more and therefore +there is no reason for this to be public any more. +So deprecate it and use an internal replacement +for the encoders using it as an upper bound for the +size of their headers. + +(cherry picked from commit dae7faa0757ee094681c5e7100baca74c007c67c) +--- + modules/codec/avcodec/avcommon_compat.h | 3 --- + modules/codec/avcodec/encoder.c | 2 +- + 2 files changed, 1 insertion(+), 4 deletions(-) + +diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h +index 8ab6910..14aa62c 100644 +--- a/modules/codec/avcodec/avcommon_compat.h ++++ b/modules/codec/avcodec/avcommon_compat.h +@@ -75,9 +75,6 @@ + #ifndef AV_CODEC_CAP_SMALL_LAST_FRAME + # define AV_CODEC_CAP_SMALL_LAST_FRAME CODEC_CAP_SMALL_LAST_FRAME + #endif +-#ifndef AV_INPUT_BUFFER_MIN_SIZE +-# define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE +-#endif + #ifndef FF_MAX_B_FRAMES + # define FF_MAX_B_FRAMES 16 // FIXME: remove this + #endif +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index be53cec..deb61eb 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -1052,7 +1052,7 @@ errmsg: + p_sys->i_sample_bytes = (p_enc->fmt_in.audio.i_bitspersample / 8); + p_sys->i_frame_size = p_context->frame_size > 1 ? + p_context->frame_size : +- AV_INPUT_BUFFER_MIN_SIZE; ++ 16384; // AV_INPUT_BUFFER_MIN_SIZE + p_sys->i_buffer_out = av_samples_get_buffer_size(NULL, + p_enc->fmt_out.audio.i_channels, p_sys->i_frame_size, + p_sys->p_context->sample_fmt, DEFAULT_ALIGN); +From: Steve Lhomme +Date: Tue, 14 Jan 2025 11:28:21 +0100 +Subject: avcodec/video: use frame flags instead of fields + +The structure fields are deprecated. +It was introduced in lavu 58.7.100. + +(cherry picked from commit c79659bc9cfa2ff14754920a706f89d07d6425e6) +--- + modules/codec/avcodec/video.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index 8524f57..dfd359c 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -1431,8 +1431,13 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error + /* Hack to force display of still pictures */ + p_pic->b_force = p_sys->b_first_frame; + p_pic->i_nb_fields = 2 + frame->repeat_pict; ++#if LIBAVUTIL_VERSION_CHECK( 58, 7, 100 ) ++ p_pic->b_progressive = !(frame->flags & AV_FRAME_FLAG_INTERLACED); ++ p_pic->b_top_field_first = !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); ++#else + p_pic->b_progressive = !frame->interlaced_frame; + p_pic->b_top_field_first = frame->top_field_first; ++#endif + + if (DecodeSidedata(p_dec, frame, p_pic)) + i_pts = VLC_TICK_INVALID; +From: Steve Lhomme +Date: Mon, 8 Sep 2025 13:51:43 +0200 +Subject: avcodec: use AV_PROFILE_xxx instead of FF_PROFILE_xxx + +This was added in libavcodec 60.26.100 [^1]. We require 58.54.100. + +[^1]: https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/8238bc0b5e3dba271217b1223a901b3f9713dc6e + +(cherry picked from commit ff292b650ea0b10c67c9e4ff16327486afe0d8ad) (edited) +- the vaapi had less profiles +- the direct_va doesn't have HEVC EXT +- FF_PROFILE_UNKNOWN was used in more places +--- + modules/codec/avcodec/audio.c | 2 +- + modules/codec/avcodec/avcommon_compat.h | 6 +++++ + modules/codec/avcodec/directx_va.c | 40 ++++++++++++++++----------------- + modules/codec/avcodec/encoder.c | 20 ++++++++--------- + modules/codec/avcodec/vaapi.c | 8 +++---- + modules/codec/avcodec/video.c | 2 +- + 6 files changed, 42 insertions(+), 36 deletions(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index b6186d6..46f9a2a 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -271,7 +271,7 @@ int InitAudioDec( vlc_object_t *obj ) + p_dec->pf_flush = Flush; + + /* XXX: Writing input format makes little sense. */ +- if( avctx->profile != FF_PROFILE_UNKNOWN ) ++ if( avctx->profile != AVPROFILE(UNKNOWN) ) + p_dec->fmt_in.i_profile = avctx->profile; + if( avctx->level != FF_LEVEL_UNKNOWN ) + p_dec->fmt_in.i_level = avctx->level; +diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h +index 14aa62c..01e6223 100644 +--- a/modules/codec/avcodec/avcommon_compat.h ++++ b/modules/codec/avcodec/avcommon_compat.h +@@ -144,4 +144,10 @@ + + #endif + ++#if LIBAVCODEC_VERSION_CHECK(60,26,100) ++# define AVPROFILE(prof) (AV_PROFILE_##prof) ++#else ++# define AVPROFILE(prof) (FF_PROFILE_##prof) ++#endif ++ + #endif +diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c +index 36a5d61..f6e252f 100644 +--- a/modules/codec/avcodec/directx_va.c ++++ b/modules/codec/avcodec/directx_va.c +@@ -48,25 +48,25 @@ struct picture_sys_t { + #include "../../packetizer/h264_nal.h" + #include "../../packetizer/hevc_nal.h" + +-static const int PROF_MPEG2_MAIN[] = { FF_PROFILE_MPEG2_SIMPLE, +- FF_PROFILE_MPEG2_MAIN, +- FF_PROFILE_UNKNOWN }; +-static const int PROF_H264_HIGH[] = { FF_PROFILE_H264_BASELINE, +- FF_PROFILE_H264_CONSTRAINED_BASELINE, +- FF_PROFILE_H264_MAIN, +- FF_PROFILE_H264_HIGH, +- FF_PROFILE_UNKNOWN }; +-static const int PROF_HEVC_MAIN[] = { FF_PROFILE_HEVC_MAIN, +- FF_PROFILE_UNKNOWN }; +-static const int PROF_HEVC_MAIN10[] = { FF_PROFILE_HEVC_MAIN, +- FF_PROFILE_HEVC_MAIN_10, +- FF_PROFILE_UNKNOWN }; +- +-static const int PROF_VP9_MAIN[] = { FF_PROFILE_VP9_0, FF_PROFILE_UNKNOWN }; +-static const int PROF_VP9_10[] = { FF_PROFILE_VP9_2, FF_PROFILE_UNKNOWN }; +- +-static const int PROF_AV1_MAIN[] = { FF_PROFILE_AV1_MAIN, FF_PROFILE_UNKNOWN }; +-static const int PROF_AV1_HIGH[] = { FF_PROFILE_AV1_HIGH, FF_PROFILE_AV1_MAIN, FF_PROFILE_UNKNOWN }; ++static const int PROF_MPEG2_MAIN[] = { AVPROFILE(MPEG2_SIMPLE), ++ AVPROFILE(MPEG2_MAIN), ++ AVPROFILE(UNKNOWN) }; ++static const int PROF_H264_HIGH[] = { AVPROFILE(H264_BASELINE), ++ AVPROFILE(H264_CONSTRAINED_BASELINE), ++ AVPROFILE(H264_MAIN), ++ AVPROFILE(H264_HIGH), ++ AVPROFILE(UNKNOWN) }; ++static const int PROF_HEVC_MAIN[] = { AVPROFILE(HEVC_MAIN), ++ AVPROFILE(UNKNOWN) }; ++static const int PROF_HEVC_MAIN10[] = { AVPROFILE(HEVC_MAIN), ++ AVPROFILE(HEVC_MAIN_10), ++ AVPROFILE(UNKNOWN) }; ++ ++static const int PROF_VP9_MAIN[] = { AVPROFILE(VP9_0), AVPROFILE(UNKNOWN) }; ++static const int PROF_VP9_10[] = { AVPROFILE(VP9_2), AVPROFILE(UNKNOWN) }; ++ ++static const int PROF_AV1_MAIN[] = { AVPROFILE(AV1_MAIN), AVPROFILE(UNKNOWN) }; ++static const int PROF_AV1_HIGH[] = { AVPROFILE(AV1_HIGH), AVPROFILE(AV1_MAIN), AVPROFILE(UNKNOWN) }; + + #include + #if defined(WINAPI_FAMILY) +@@ -436,7 +436,7 @@ static bool profile_supported(const directx_va_mode_t *mode, const es_format_t * + bool is_supported = false; + if (profile <= 0) + is_supported = true; +- else for (const int *p_profile = &mode->p_profiles[0]; *p_profile != FF_PROFILE_UNKNOWN; ++p_profile) ++ else for (const int *p_profile = &mode->p_profiles[0]; *p_profile != AVPROFILE(UNKNOWN); ++p_profile) + { + if (*p_profile == profile) + { +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index deb61eb..1f3dd8f 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -484,30 +484,30 @@ int InitVideoEnc( vlc_object_t *p_this ) + psz_val = var_GetString( p_enc, ENC_CFG_PREFIX "aac-profile" ); + /* libavcodec uses faac encoder atm, and it has issues with + * other than low-complexity profile, so default to that */ +- p_sys->i_aac_profile = FF_PROFILE_AAC_LOW; ++ p_sys->i_aac_profile = AVPROFILE(AAC_LOW); + if( psz_val && *psz_val ) + { + if( !strncmp( psz_val, "main", 4 ) ) +- p_sys->i_aac_profile = FF_PROFILE_AAC_MAIN; ++ p_sys->i_aac_profile = AVPROFILE(AAC_MAIN); + else if( !strncmp( psz_val, "low", 3 ) ) +- p_sys->i_aac_profile = FF_PROFILE_AAC_LOW; ++ p_sys->i_aac_profile = AVPROFILE(AAC_LOW); + else if( !strncmp( psz_val, "ssr", 3 ) ) +- p_sys->i_aac_profile = FF_PROFILE_AAC_SSR; ++ p_sys->i_aac_profile = AVPROFILE(AAC_SSR); + else if( !strncmp( psz_val, "ltp", 3 ) ) +- p_sys->i_aac_profile = FF_PROFILE_AAC_LTP; ++ p_sys->i_aac_profile = AVPROFILE(AAC_LTP); + /* These require libavcodec with libfdk-aac */ + else if( !strncmp( psz_val, "hev2", 4 ) ) +- p_sys->i_aac_profile = FF_PROFILE_AAC_HE_V2; ++ p_sys->i_aac_profile = AVPROFILE(AAC_HE_V2); + else if( !strncmp( psz_val, "hev1", 4 ) ) +- p_sys->i_aac_profile = FF_PROFILE_AAC_HE; ++ p_sys->i_aac_profile = AVPROFILE(AAC_HE); + else if( !strncmp( psz_val, "ld", 2 ) ) +- p_sys->i_aac_profile = FF_PROFILE_AAC_LD; ++ p_sys->i_aac_profile = AVPROFILE(AAC_LD); + else if( !strncmp( psz_val, "eld", 3 ) ) +- p_sys->i_aac_profile = FF_PROFILE_AAC_ELD; ++ p_sys->i_aac_profile = AVPROFILE(AAC_ELD); + else + { + msg_Warn( p_enc, "unknown AAC profile requested, setting it to low" ); +- p_sys->i_aac_profile = FF_PROFILE_AAC_LOW; ++ p_sys->i_aac_profile = AVPROFILE(AAC_LOW); + } + } + free( psz_val ); +diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c +index e203baa..5380099 100644 +--- a/modules/codec/avcodec/vaapi.c ++++ b/modules/codec/avcodec/vaapi.c +@@ -100,9 +100,9 @@ static int GetVaProfile(AVCodecContext *ctx, const es_format_t *fmt, + count = 18; + break; + case AV_CODEC_ID_HEVC: +- if (ctx->profile == FF_PROFILE_HEVC_MAIN) ++ if (ctx->profile == AVPROFILE(HEVC_MAIN)) + i_profile = VAProfileHEVCMain; +- else if (ctx->profile == FF_PROFILE_HEVC_MAIN_10) ++ else if (ctx->profile == AVPROFILE(HEVC_MAIN_10)) + { + i_profile = VAProfileHEVCMain10; + i_vlc_chroma = VLC_CODEC_VAAPI_420_10BPP; +@@ -116,10 +116,10 @@ static int GetVaProfile(AVCodecContext *ctx, const es_format_t *fmt, + count = 5; + break; + case AV_CODEC_ID_VP9: +- if (ctx->profile == FF_PROFILE_VP9_0) ++ if (ctx->profile == AVPROFILE(VP9_0)) + i_profile = VAProfileVP9Profile0; + #if VA_CHECK_VERSION( 0, 39, 0 ) +- else if (ctx->profile == FF_PROFILE_VP9_2) ++ else if (ctx->profile == AVPROFILE(VP9_2)) + { + i_profile = VAProfileVP9Profile2; + i_vlc_chroma = VLC_CODEC_VAAPI_420_10BPP; +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index dfd359c..2448e07 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -624,7 +624,7 @@ static int InitVideoDecCommon( decoder_t *p_dec ) + p_dec->pf_flush = Flush; + + /* XXX: Writing input format makes little sense. */ +- if( p_context->profile != FF_PROFILE_UNKNOWN ) ++ if( p_context->profile != AVPROFILE(UNKNOWN) ) + p_dec->fmt_in.i_profile = p_context->profile; + if( p_context->level != FF_LEVEL_UNKNOWN ) + p_dec->fmt_in.i_level = p_context->level; +From: Steve Lhomme +Date: Tue, 9 Dec 2025 11:42:02 +0100 +Subject: avcodec: use AV_LEVEL_xxx instead of FF_LEVEL_xxx + +This was added in libavcodec 60.26.100 [^1]. + +[^1]: https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/8238bc0b5e3dba271217b1223a901b3f9713dc6e +--- + modules/codec/avcodec/audio.c | 2 +- + modules/codec/avcodec/avcommon_compat.h | 6 ++++++ + modules/codec/avcodec/video.c | 2 +- + 3 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c +index 46f9a2a..d3748cc 100644 +--- a/modules/codec/avcodec/audio.c ++++ b/modules/codec/avcodec/audio.c +@@ -273,7 +273,7 @@ int InitAudioDec( vlc_object_t *obj ) + /* XXX: Writing input format makes little sense. */ + if( avctx->profile != AVPROFILE(UNKNOWN) ) + p_dec->fmt_in.i_profile = avctx->profile; +- if( avctx->level != FF_LEVEL_UNKNOWN ) ++ if( avctx->level != AVLEVEL(UNKNOWN) ) + p_dec->fmt_in.i_level = avctx->level; + + return VLC_SUCCESS; +diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h +index 01e6223..b3fb167 100644 +--- a/modules/codec/avcodec/avcommon_compat.h ++++ b/modules/codec/avcodec/avcommon_compat.h +@@ -150,4 +150,10 @@ + # define AVPROFILE(prof) (FF_PROFILE_##prof) + #endif + ++#if LIBAVCODEC_VERSION_CHECK(60,26,100) ++# define AVLEVEL(prof) (AV_LEVEL_##prof) ++#else ++# define AVLEVEL(prof) (FF_LEVEL_##prof) ++#endif ++ + #endif +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index 2448e07..3412a7f 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -626,7 +626,7 @@ static int InitVideoDecCommon( decoder_t *p_dec ) + /* XXX: Writing input format makes little sense. */ + if( p_context->profile != AVPROFILE(UNKNOWN) ) + p_dec->fmt_in.i_profile = p_context->profile; +- if( p_context->level != FF_LEVEL_UNKNOWN ) ++ if( p_context->level != AVLEVEL(UNKNOWN) ) + p_dec->fmt_in.i_level = p_context->level; + return VLC_SUCCESS; + } diff --git a/multimedia/vlc/pkg-plist b/multimedia/vlc/pkg-plist index 65b62d70adc5..e08b004f2bca 100644 --- a/multimedia/vlc/pkg-plist +++ b/multimedia/vlc/pkg-plist @@ -1,236 +1,236 @@ bin/cvlc %%NCURSES%%bin/nvlc %%QT5%%bin/qvlc bin/rvlc %%SKINS%%bin/svlc bin/vlc bin/vlc-wrapper include/vlc/deprecated.h include/vlc/libvlc.h include/vlc/libvlc_dialog.h include/vlc/libvlc_events.h include/vlc/libvlc_media.h include/vlc/libvlc_media_discoverer.h include/vlc/libvlc_media_library.h include/vlc/libvlc_media_list.h include/vlc/libvlc_media_list_player.h include/vlc/libvlc_media_player.h include/vlc/libvlc_renderer_discoverer.h include/vlc/libvlc_version.h include/vlc/libvlc_vlm.h include/vlc/plugins/vlc_about.h include/vlc/plugins/vlc_access.h include/vlc/plugins/vlc_actions.h include/vlc/plugins/vlc_addons.h include/vlc/plugins/vlc_aout.h include/vlc/plugins/vlc_aout_volume.h include/vlc/plugins/vlc_arrays.h include/vlc/plugins/vlc_atomic.h include/vlc/plugins/vlc_avcodec.h include/vlc/plugins/vlc_bits.h include/vlc/plugins/vlc_block.h include/vlc/plugins/vlc_block_helper.h include/vlc/plugins/vlc_boxes.h include/vlc/plugins/vlc_charset.h include/vlc/plugins/vlc_codec.h include/vlc/plugins/vlc_common.h include/vlc/plugins/vlc_config.h include/vlc/plugins/vlc_config_cat.h include/vlc/plugins/vlc_configuration.h include/vlc/plugins/vlc_cpu.h include/vlc/plugins/vlc_demux.h include/vlc/plugins/vlc_dialog.h include/vlc/plugins/vlc_epg.h include/vlc/plugins/vlc_es.h include/vlc/plugins/vlc_es_out.h include/vlc/plugins/vlc_events.h include/vlc/plugins/vlc_filter.h include/vlc/plugins/vlc_fingerprinter.h include/vlc/plugins/vlc_fourcc.h include/vlc/plugins/vlc_fs.h include/vlc/plugins/vlc_gcrypt.h include/vlc/plugins/vlc_http.h include/vlc/plugins/vlc_httpd.h include/vlc/plugins/vlc_image.h include/vlc/plugins/vlc_inhibit.h include/vlc/plugins/vlc_input.h include/vlc/plugins/vlc_input_item.h include/vlc/plugins/vlc_interface.h include/vlc/plugins/vlc_interrupt.h include/vlc/plugins/vlc_keystore.h include/vlc/plugins/vlc_main.h include/vlc/plugins/vlc_md5.h include/vlc/plugins/vlc_media_library.h include/vlc/plugins/vlc_memstream.h include/vlc/plugins/vlc_messages.h include/vlc/plugins/vlc_meta.h include/vlc/plugins/vlc_meta_fetcher.h include/vlc/plugins/vlc_mime.h include/vlc/plugins/vlc_modules.h include/vlc/plugins/vlc_mouse.h include/vlc/plugins/vlc_mtime.h include/vlc/plugins/vlc_network.h include/vlc/plugins/vlc_objects.h include/vlc/plugins/vlc_opengl.h include/vlc/plugins/vlc_picture.h include/vlc/plugins/vlc_picture_fifo.h include/vlc/plugins/vlc_picture_pool.h include/vlc/plugins/vlc_playlist.h include/vlc/plugins/vlc_plugin.h include/vlc/plugins/vlc_probe.h include/vlc/plugins/vlc_rand.h include/vlc/plugins/vlc_renderer_discovery.h include/vlc/plugins/vlc_services_discovery.h include/vlc/plugins/vlc_sout.h include/vlc/plugins/vlc_spu.h include/vlc/plugins/vlc_stream.h include/vlc/plugins/vlc_stream_extractor.h include/vlc/plugins/vlc_strings.h include/vlc/plugins/vlc_subpicture.h include/vlc/plugins/vlc_text_style.h include/vlc/plugins/vlc_threads.h include/vlc/plugins/vlc_timestamp_helper.h include/vlc/plugins/vlc_tls.h include/vlc/plugins/vlc_url.h include/vlc/plugins/vlc_variables.h include/vlc/plugins/vlc_video_splitter.h include/vlc/plugins/vlc_viewpoint.h include/vlc/plugins/vlc_vlm.h include/vlc/plugins/vlc_vout.h include/vlc/plugins/vlc_vout_display.h include/vlc/plugins/vlc_vout_osd.h include/vlc/plugins/vlc_vout_window.h include/vlc/plugins/vlc_xlib.h include/vlc/plugins/vlc_xml.h include/vlc/vlc.h lib/libvlc.so lib/libvlc.so.5 lib/libvlc.so.5.6.1 lib/libvlccore.so lib/libvlccore.so.9 lib/libvlccore.so.9.0.1 libdata/pkgconfig/libvlc.pc libdata/pkgconfig/vlc-plugin.pc share/man/man1/vlc-wrapper.1.gz share/man/man1/vlc.1.gz share/applications/vlc.desktop share/icons/hicolor/128x128/apps/vlc-kb.png share/icons/hicolor/128x128/apps/vlc-xmas.png share/icons/hicolor/128x128/apps/vlc.png share/icons/hicolor/16x16/apps/vlc.png share/icons/hicolor/16x16/apps/vlc.xpm share/icons/hicolor/256x256/apps/vlc.png share/icons/hicolor/32x32/apps/vlc-xmas.xpm share/icons/hicolor/32x32/apps/vlc.png share/icons/hicolor/32x32/apps/vlc.xpm share/icons/hicolor/48x48/apps/vlc-xmas.png share/icons/hicolor/48x48/apps/vlc.png %%NLS%%share/locale/ach/LC_MESSAGES/vlc.mo %%NLS%%share/locale/af/LC_MESSAGES/vlc.mo %%NLS%%share/locale/am/LC_MESSAGES/vlc.mo %%NLS%%share/locale/am_ET/LC_MESSAGES/vlc.mo %%NLS%%share/locale/an/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ar/LC_MESSAGES/vlc.mo -%%NLS%%share/locale/as_IN/LC_MESSAGES/vlc.mo +%%NLS%%share/locale/as/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ast/LC_MESSAGES/vlc.mo %%NLS%%share/locale/be/LC_MESSAGES/vlc.mo %%NLS%%share/locale/bg/LC_MESSAGES/vlc.mo %%NLS%%share/locale/bn/LC_MESSAGES/vlc.mo %%NLS%%share/locale/bn_IN/LC_MESSAGES/vlc.mo %%NLS%%share/locale/br/LC_MESSAGES/vlc.mo %%NLS%%share/locale/brx/LC_MESSAGES/vlc.mo %%NLS%%share/locale/bs/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ca/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ca@valencia/LC_MESSAGES/vlc.mo %%NLS%%share/locale/cgg/LC_MESSAGES/vlc.mo %%NLS%%share/locale/co/LC_MESSAGES/vlc.mo %%NLS%%share/locale/cs/LC_MESSAGES/vlc.mo %%NLS%%share/locale/cy/LC_MESSAGES/vlc.mo %%NLS%%share/locale/da/LC_MESSAGES/vlc.mo %%NLS%%share/locale/de/LC_MESSAGES/vlc.mo %%NLS%%share/locale/el/LC_MESSAGES/vlc.mo %%NLS%%share/locale/en_GB/LC_MESSAGES/vlc.mo %%NLS%%share/locale/eo/LC_MESSAGES/vlc.mo %%NLS%%share/locale/es/LC_MESSAGES/vlc.mo %%NLS%%share/locale/es_MX/LC_MESSAGES/vlc.mo %%NLS%%share/locale/et/LC_MESSAGES/vlc.mo %%NLS%%share/locale/eu/LC_MESSAGES/vlc.mo %%NLS%%share/locale/fa/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ff/LC_MESSAGES/vlc.mo %%NLS%%share/locale/fi/LC_MESSAGES/vlc.mo %%NLS%%share/locale/fr/LC_MESSAGES/vlc.mo %%NLS%%share/locale/fur/LC_MESSAGES/vlc.mo %%NLS%%share/locale/fy/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ga/LC_MESSAGES/vlc.mo %%NLS%%share/locale/gd/LC_MESSAGES/vlc.mo %%NLS%%share/locale/gl/LC_MESSAGES/vlc.mo %%NLS%%share/locale/gu/LC_MESSAGES/vlc.mo %%NLS%%share/locale/he/LC_MESSAGES/vlc.mo %%NLS%%share/locale/hi/LC_MESSAGES/vlc.mo %%NLS%%share/locale/hr/LC_MESSAGES/vlc.mo %%NLS%%share/locale/hu/LC_MESSAGES/vlc.mo %%NLS%%share/locale/hy/LC_MESSAGES/vlc.mo %%NLS%%share/locale/id/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ie/LC_MESSAGES/vlc.mo %%NLS%%share/locale/is/LC_MESSAGES/vlc.mo %%NLS%%share/locale/it/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ja/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ka/LC_MESSAGES/vlc.mo %%NLS%%share/locale/kab/LC_MESSAGES/vlc.mo %%NLS%%share/locale/kk/LC_MESSAGES/vlc.mo %%NLS%%share/locale/km/LC_MESSAGES/vlc.mo %%NLS%%share/locale/kn/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ko/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ks_IN/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ku_IQ/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ky/LC_MESSAGES/vlc.mo %%NLS%%share/locale/lg/LC_MESSAGES/vlc.mo %%NLS%%share/locale/lo/LC_MESSAGES/vlc.mo %%NLS%%share/locale/lt/LC_MESSAGES/vlc.mo %%NLS%%share/locale/lv/LC_MESSAGES/vlc.mo %%NLS%%share/locale/mai/LC_MESSAGES/vlc.mo %%NLS%%share/locale/mk/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ml/LC_MESSAGES/vlc.mo %%NLS%%share/locale/mn/LC_MESSAGES/vlc.mo %%NLS%%share/locale/mr/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ms/LC_MESSAGES/vlc.mo %%NLS%%share/locale/my/LC_MESSAGES/vlc.mo %%NLS%%share/locale/nb/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ne/LC_MESSAGES/vlc.mo %%NLS%%share/locale/nl/LC_MESSAGES/vlc.mo %%NLS%%share/locale/nn/LC_MESSAGES/vlc.mo %%NLS%%share/locale/oc/LC_MESSAGES/vlc.mo %%NLS%%share/locale/or_IN/LC_MESSAGES/vlc.mo %%NLS%%share/locale/pa/LC_MESSAGES/vlc.mo %%NLS%%share/locale/pl/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ps/LC_MESSAGES/vlc.mo %%NLS%%share/locale/pt_BR/LC_MESSAGES/vlc.mo %%NLS%%share/locale/pt_PT/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ro/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ru/LC_MESSAGES/vlc.mo %%NLS%%share/locale/si/LC_MESSAGES/vlc.mo %%NLS%%share/locale/sk/LC_MESSAGES/vlc.mo %%NLS%%share/locale/sl/LC_MESSAGES/vlc.mo %%NLS%%share/locale/sm/LC_MESSAGES/vlc.mo %%NLS%%share/locale/sq/LC_MESSAGES/vlc.mo %%NLS%%share/locale/sr/LC_MESSAGES/vlc.mo %%NLS%%share/locale/sv/LC_MESSAGES/vlc.mo %%NLS%%share/locale/sw/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ta/LC_MESSAGES/vlc.mo %%NLS%%share/locale/te/LC_MESSAGES/vlc.mo %%NLS%%share/locale/th/LC_MESSAGES/vlc.mo %%NLS%%share/locale/tr/LC_MESSAGES/vlc.mo %%NLS%%share/locale/tt/LC_MESSAGES/vlc.mo %%NLS%%share/locale/ug/LC_MESSAGES/vlc.mo %%NLS%%share/locale/uk/LC_MESSAGES/vlc.mo %%NLS%%share/locale/uz/LC_MESSAGES/vlc.mo %%NLS%%share/locale/vi/LC_MESSAGES/vlc.mo %%NLS%%share/locale/wa/LC_MESSAGES/vlc.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/vlc.mo %%NLS%%share/locale/zh_TW/LC_MESSAGES/vlc.mo %%NLS%%share/locale/zu/LC_MESSAGES/vlc.mo -share/metainfo/vlc.appdata.xml +share/metainfo/org.videolan.vlc.appdata.xml share/solid/actions/vlc-openbd.desktop share/solid/actions/vlc-opencda.desktop share/solid/actions/vlc-opendvd.desktop share/solid/actions/vlc-openvcd.desktop