diff --git a/Revert-taglib-wav-fix-RIFF-INFO-tags-parsing.patch b/Revert-taglib-wav-fix-RIFF-INFO-tags-parsing.patch new file mode 100644 index 0000000..031fb91 --- /dev/null +++ b/Revert-taglib-wav-fix-RIFF-INFO-tags-parsing.patch @@ -0,0 +1,84 @@ +From 81b2bf43c688e081454b6382db8c7cd917232446 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Thu, 12 Oct 2023 16:42:21 +0200 +Subject: [PATCH] Revert "taglib: wav: fix RIFF INFO tags parsing" + +This reverts commit 85868dfb0319dced501a78dfd2ee6432d6be90f3. +--- + modules/meta_engine/taglib.cpp | 38 ++++++---------------------------- + 1 file changed, 6 insertions(+), 32 deletions(-) + +diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp +index 84b401c795a9..d65607b98dc0 100644 +--- a/modules/meta_engine/taglib.cpp ++++ b/modules/meta_engine/taglib.cpp +@@ -845,28 +845,6 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_meta_t *p_demux_meta, vlc_meta + } + } + +-static int ReadWAVMeta( const RIFF::WAV::File *wav, demux_meta_t *demux_meta ) +-{ +- if( !wav->hasID3v2Tag() && !wav->hasInfoTag() ) +- return VLC_EGENERIC; +- +- demux_meta->p_meta = vlc_meta_New(); +- if( !demux_meta->p_meta ) +- return VLC_ENOMEM; +- +- TAB_INIT( demux_meta->i_attachments, demux_meta->attachments ); +- +- if( wav->hasInfoTag() ) +- ReadMetaFromBasicTag( wav->InfoTag(), demux_meta->p_meta ); +- if( wav->hasID3v2Tag() ) +- { +- // Re-read basic tags from id3 to prioritize it against INFO tags. +- ReadMetaFromBasicTag( wav->ID3v2Tag(), demux_meta->p_meta ); +- ReadMetaFromId3v2( wav->ID3v2Tag(), demux_meta, demux_meta->p_meta ); +- } +- return VLC_SUCCESS; +-} +- + /** + * Get the tags from the file using TagLib + * @param p_this: the demux object +@@ -942,14 +920,6 @@ static int ReadMeta( vlc_object_t* p_this) + + if( f.isNull() ) + return VLC_EGENERIC; +- +- // XXX: Workaround a quirk in TagLib that doesn't merge id3 tags and RIFF +- // INFO tags in `Wav::File::tag()`'s return value. +- // This forces us to parse WAV separately for now. +- const auto* riff_wav = dynamic_cast(f.file()); +- if (riff_wav != nullptr) +- return ReadWAVMeta(riff_wav, p_demux_meta); +- + if( !f.tag() || f.tag()->isEmpty() ) + return VLC_EGENERIC; + +@@ -957,6 +927,7 @@ static int ReadMeta( vlc_object_t* p_this) + if( !p_meta ) + return VLC_ENOMEM; + ++ + // Read the tags from the file + ReadMetaFromBasicTag(f.tag(), p_meta); + +@@ -1011,9 +982,12 @@ static int ReadMeta( vlc_object_t* p_this) + ReadMetaFromXiph( ogg_opus->tag(), p_demux_meta, p_meta ); + #endif + } +- else if( RIFF::AIFF::File* riff_aiff = dynamic_cast(f.file()) ) ++ else if( dynamic_cast(f.file()) ) + { +- ReadMetaFromId3v2( riff_aiff->tag(), p_demux_meta, p_meta ); ++ if( RIFF::AIFF::File* riff_aiff = dynamic_cast(f.file()) ) ++ ReadMetaFromId3v2( riff_aiff->tag(), p_demux_meta, p_meta ); ++ else if( RIFF::WAV::File* riff_wav = dynamic_cast(f.file()) ) ++ ReadMetaFromId3v2( riff_wav->tag(), p_demux_meta, p_meta ); + } + else if( TrueAudio::File* trueaudio = dynamic_cast(f.file()) ) + { +-- +2.41.0 + diff --git a/vlc.spec b/vlc.spec index b5b4d25..c348f20 100644 --- a/vlc.spec +++ b/vlc.spec @@ -64,6 +64,7 @@ License: GPLv2+ URL: https://www.videolan.org Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch +Patch4: Revert-taglib-wav-fix-RIFF-INFO-tags-parsing.patch Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch # lua-5.1 is used by default for vlc build @@ -323,6 +324,7 @@ VLC media player extras modules. %setup -q -n %{vlc_setup} %patch -P3 -p1 %if 0%{?el7} +%patch -P4 -p1 %patch -P5 -p1 %patch -P6 -p1 # Lower opus requirement - rfbz#5585