commit
57a10c765a
@ -0,0 +1,84 @@
|
|||||||
|
From 81b2bf43c688e081454b6382db8c7cd917232446 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nicolas Chauvet <kwizart@gmail.com>
|
||||||
|
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<RIFF::WAV::File*>(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<RIFF::AIFF::File*>(f.file()) )
|
||||||
|
+ else if( dynamic_cast<RIFF::File*>(f.file()) )
|
||||||
|
{
|
||||||
|
- ReadMetaFromId3v2( riff_aiff->tag(), p_demux_meta, p_meta );
|
||||||
|
+ if( RIFF::AIFF::File* riff_aiff = dynamic_cast<RIFF::AIFF::File*>(f.file()) )
|
||||||
|
+ ReadMetaFromId3v2( riff_aiff->tag(), p_demux_meta, p_meta );
|
||||||
|
+ else if( RIFF::WAV::File* riff_wav = dynamic_cast<RIFF::WAV::File*>(f.file()) )
|
||||||
|
+ ReadMetaFromId3v2( riff_wav->tag(), p_demux_meta, p_meta );
|
||||||
|
}
|
||||||
|
else if( TrueAudio::File* trueaudio = dynamic_cast<TrueAudio::File*>(f.file()) )
|
||||||
|
{
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
@ -1 +1 @@
|
|||||||
SHA512 (vlc-32b50de.tar.gz) = 6a2b393cd45704528f9ef4aa894f552b93c0831f81dd54fa29ad877c0e5bc8bda836f830bf2d0bf049d482d4dad46135dddc73d28c5365bd15c1c33e460e72ed
|
SHA512 (vlc-6f0d0ab.tar.gz) = 5a2529a397c27c97d0a8ac32d483327b3f47f90ce97c86ff7c169e4c349456c95339b755f28320cbc717d52148225402f6fd64009d7543f50a85701d303dbd6a
|
||||||
|
Loading…
Reference in new issue