From b34d35ccdc6282b4584693786980c8d6ed6708f8 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 11 Sep 2017 23:04:42 +0200 Subject: Updated deps for KDE 5_17.09 --- deps/id3lib/patches/id3lib.c_wrapper.patch | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 deps/id3lib/patches/id3lib.c_wrapper.patch (limited to 'deps/id3lib/patches/id3lib.c_wrapper.patch') diff --git a/deps/id3lib/patches/id3lib.c_wrapper.patch b/deps/id3lib/patches/id3lib.c_wrapper.patch new file mode 100644 index 0000000..d72e81c --- /dev/null +++ b/deps/id3lib/patches/id3lib.c_wrapper.patch @@ -0,0 +1,58 @@ +This patch adds C wrapper functions for field encoding. + +It was first introduced in version 3.8.3-8 and fixes +http://bugs.debian.org/281292 +--- a/include/id3.h ++++ b/include/id3.h +@@ -104,6 +104,9 @@ + ID3_C_EXPORT void CCONV ID3Field_GetBINARY (const ID3Field *field, uchar *buffer, size_t buffLength); + ID3_C_EXPORT void CCONV ID3Field_FromFile (ID3Field *field, const char *fileName); + ID3_C_EXPORT void CCONV ID3Field_ToFile (const ID3Field *field, const char *fileName); ++ ID3_C_EXPORT bool CCONV ID3Field_SetEncoding (ID3Field *field, ID3_TextEnc enc); ++ ID3_C_EXPORT ID3_TextEnc CCONV ID3Field_GetEncoding (const ID3Field *field); ++ ID3_C_EXPORT bool CCONV ID3Field_IsEncodable (const ID3Field *field); + + /* field-info wrappers */ + ID3_C_EXPORT char* CCONV ID3FrameInfo_ShortName (ID3_FrameID frameid); +--- a/src/c_wrapper.cpp ++++ b/src/c_wrapper.cpp +@@ -681,6 +681,39 @@ + } + } + ++ ID3_C_EXPORT bool CCONV ++ ID3Field_SetEncoding(ID3Field *field, ID3_TextEnc enc) ++ { ++ bool changed = false; ++ if (field) ++ { ++ ID3_CATCH(changed = reinterpret_cast(field)->SetEncoding(enc)); ++ } ++ return changed; ++ } ++ ++ ID3_C_EXPORT ID3_TextEnc CCONV ++ ID3Field_GetEncoding(const ID3Field *field) ++ { ++ ID3_TextEnc enc = ID3TE_NONE; ++ if (field) ++ { ++ ID3_CATCH(enc = reinterpret_cast(field)->GetEncoding()); ++ } ++ return enc; ++ } ++ ++ ID3_C_EXPORT bool CCONV ++ ID3Field_IsEncodable(const ID3Field *field) ++ { ++ bool isEncodable = false; ++ if (field) ++ { ++ ID3_CATCH(isEncodable = reinterpret_cast(field)->IsEncodable()); ++ } ++ return isEncodable; ++ } ++ + #ifdef __cplusplus + } + #endif /* __cplusplus */ -- cgit v1.2.3