summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormio <[email protected]>2024-08-18 22:52:56 +1000
committermio <[email protected]>2024-08-19 19:36:50 +1000
commiteb8c47226987d83a08d455cdaf2cfa49c5a60e72 (patch)
tree05bd192aa93bc12e6b92b467124a919ebf733090
parent74865d77e106a336d607d0ca84e3e6f7c41e4372 (diff)
downloadtdemultimedia-eb8c47226987d83a08d455cdaf2cfa49c5a60e72.tar.gz
tdemultimedia-eb8c47226987d83a08d455cdaf2cfa49c5a60e72.zip
Fix mime type registration for FLAC with taglib>=2
The TAGLIB_*_VERSION macros are not (and never have been) defined in tag.h, however, tag.h used to include tstring.h, which included taglib.h [0]. KFlacPlugin doesn't use the 'name' argument in it's constructor so it can support earlier versions of taglib (< 1.2), instead, it registers the mime type info for both 'audio/x-flac' and 'audio/x-oggflac' when it is first loaded. However, since 'audio/x-oggflac' was never being registered (because TAGLIB_1_2 wasn't defined), when KRenamer attempted to get the mime type info for 'audio/x-oggflac', the call failed and it's 'keys' member was never altered, causing the additional 'flac' to be appended [1]. [0]: https://github.com/taglib/taglib/commit/a08acdcf23c5d4ac4cb795f5edfdc539055138b7#diff-83ce8ae463020e723895af7e50380bc507f358a2d56313767d5305a759bb9f02 [1]: https://mirror.git.trinitydesktop.org/gitea/TDE/krename/src/branch/r14.1.x/krename/fileplugin.cpp#L46-L98 Fixes: https://mirror.git.trinitydesktop.org/gitea/TDE/tdemultimedia/issues/77 Signed-off-by: mio <[email protected]>
-rw-r--r--tdefile-plugins/flac/tdefile_flac.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tdefile-plugins/flac/tdefile_flac.cpp b/tdefile-plugins/flac/tdefile_flac.cpp
index 3ee4efa2..d99721e0 100644
--- a/tdefile-plugins/flac/tdefile_flac.cpp
+++ b/tdefile-plugins/flac/tdefile_flac.cpp
@@ -38,6 +38,7 @@
#include <ksavefile.h>
#include <tag.h>
+#include <taglib.h>
#if (TAGLIB_MAJOR_VERSION>1) || \
((TAGLIB_MAJOR_VERSION==1) && (TAGLIB_MINOR_VERSION>=2))
#define TAGLIB_1_2