python: fix disabling the SSL module
[buildroot-gz.git] / package / kodi / 0008-Fix-nullpadding-issue-when-reading-certain-id3v1-tag.patch
blobdc428d6ced652fa8f6723b741e8803008f85d495
1 From 78571ed421e3fd3d5244cd76670e4e1bab69132f Mon Sep 17 00:00:00 2001
2 From: Bernd Kuhls <bernd.kuhls@t-online.de>
3 Date: Fri, 27 May 2016 17:30:28 +0200
4 Subject: [PATCH 1/1] Fix nullpadding issue when reading certain id3v1 tags
6 backported from upstream commit to master branch:
8 https://github.com/xbmc/xbmc/commit/cdabf9dd9e82f4b2d639fb769db08227a7c52046
10 to fix problems with taglib-1.11:
12 http://trac.kodi.tv/ticket/16454
13 https://github.com/taglib/taglib/issues/741#issuecomment-218059031
15 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
16 ---
17 xbmc/music/tags/TagLoaderTagLib.cpp | 21 ---------------------
18 xbmc/music/tags/TagLoaderTagLib.h | 3 +++
19 2 files changed, 3 insertions(+), 21 deletions(-)
21 diff --git a/xbmc/music/tags/TagLoaderTagLib.cpp b/xbmc/music/tags/TagLoaderTagLib.cpp
22 index b78a591..0fc346a 100644
23 --- a/xbmc/music/tags/TagLoaderTagLib.cpp
24 +++ b/xbmc/music/tags/TagLoaderTagLib.cpp
25 @@ -46,31 +46,12 @@
26 #include "utils/URIUtils.h"
27 #include "utils/log.h"
28 #include "utils/StringUtils.h"
29 -#include "utils/CharsetConverter.h"
30 #include "utils/Base64.h"
31 #include "settings/AdvancedSettings.h"
33 using namespace TagLib;
34 using namespace MUSIC_INFO;
36 -template<class T>
37 -class TagStringHandler : public T
39 -public:
40 - TagStringHandler() {}
41 - virtual ~TagStringHandler() {}
42 - virtual String parse(const ByteVector &data) const
43 - {
44 - std::string strSource(data.data(), data.size());
45 - std::string strUTF8;
46 - g_charsetConverter.unknownToUTF8(strSource, strUTF8);
47 - return String(strUTF8, String::UTF8);
48 - }
49 -};
51 -static const TagStringHandler<ID3v1::StringHandler> ID3v1StringHandler;
52 -static const TagStringHandler<ID3v2::Latin1StringHandler> ID3v2StringHandler;
54 CTagLoaderTagLib::CTagLoaderTagLib()
57 @@ -824,8 +805,6 @@ bool CTagLoaderTagLib::Load(const std::string& strFileName, CMusicInfoTag& tag,
58 return false;
61 - ID3v1::Tag::setStringHandler(&ID3v1StringHandler);
62 - ID3v2::Tag::setLatin1StringHandler(&ID3v2StringHandler);
63 TagLib::File* file = NULL;
64 TagLib::APE::File* apeFile = NULL;
65 TagLib::ASF::File* asfFile = NULL;
66 diff --git a/xbmc/music/tags/TagLoaderTagLib.h b/xbmc/music/tags/TagLoaderTagLib.h
67 index f83ea4f..0edb84f 100644
68 --- a/xbmc/music/tags/TagLoaderTagLib.h
69 +++ b/xbmc/music/tags/TagLoaderTagLib.h
70 @@ -44,6 +44,9 @@
71 #include <taglib/mp4tag.h>
72 #include "ImusicInfoTagLoader.h"
74 +#include <string>
75 +#include <vector>
77 namespace MUSIC_INFO
79 class CMusicInfoTag;
80 --
81 2.8.1