Skip to content

Commit 973d8d5

Browse files
authored
Merge pull request #320 from David-EIPI/cvariant_collision
Put CVariant into own namespace
2 parents b3999c4 + 3357677 commit 973d8d5

File tree

7 files changed

+14
-4
lines changed

7 files changed

+14
-4
lines changed

inputstream.ffmpegdirect/addon.xml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<addon
33
id="inputstream.ffmpegdirect"
4-
version="22.1.0"
4+
version="22.1.1"
55
name="Inputstream FFmpeg Direct"
66
provider-name="Ross Nicholson">
77
<requires>@ADDON_DEPENDS@</requires>

inputstream.ffmpegdirect/changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v22.1.1
2+
- Move CVariant to ffmpegdirect namespace to avoid collision with CVariant in Kodi, which causes random crashes when playing streams with this addon.
3+
14
v22.1.0
25
- Bump ffmpeg to 7.1 and add patch to fix build on aarch64 targeting ios/tvos
36
- Bump gnutls to 3.8.8 and add patch to fix build on Android NDK r27+

src/stream/url/URL.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <kodi/tools/StringUtils.h>
2626

2727
using namespace kodi::tools;
28+
using namespace ffmpegdirect;
2829
//using namespace ADDON;
2930

3031
namespace

src/stream/url/UrlOptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ bool CUrlOptions::HasOption(const std::string &key) const
157157
return m_options.find(key) != m_options.end();
158158
}
159159

160-
bool CUrlOptions::GetOption(const std::string &key, CVariant &value) const
160+
bool CUrlOptions::GetOption(const std::string &key, ffmpegdirect::CVariant &value) const
161161
{
162162
if (key.empty())
163163
return false;

src/stream/url/UrlOptions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class CUrlOptions
1616
{
1717
public:
18-
typedef std::map<std::string, CVariant> UrlOptions;
18+
typedef std::map<std::string, ffmpegdirect::CVariant> UrlOptions;
1919

2020
CUrlOptions();
2121
CUrlOptions(const std::string &options, const char *strLead = "");
@@ -37,7 +37,7 @@ class CUrlOptions
3737
virtual void RemoveOption(const std::string &key);
3838

3939
bool HasOption(const std::string &key) const;
40-
bool GetOption(const std::string &key, CVariant &value) const;
40+
bool GetOption(const std::string &key, ffmpegdirect::CVariant &value) const;
4141

4242
protected:
4343
UrlOptions m_options;

src/stream/url/Variant.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include <string.h>
1212
#include <utility>
1313

14+
using namespace ffmpegdirect;
15+
1416
#ifndef strtoll
1517
#ifdef TARGET_WINDOWS
1618
#define strtoll _strtoi64

src/stream/url/Variant.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ double str2double(const std::wstring &str, double fallback = 0.0);
2525
#pragma pack(8)
2626
#endif
2727

28+
namespace ffmpegdirect
29+
{
2830
class CVariant
2931
{
3032
public:
@@ -162,6 +164,8 @@ class CVariant
162164
static VariantMap EMPTY_MAP;
163165
};
164166

167+
} // namespace ffmpegdirect
168+
165169
#ifdef TARGET_WINDOWS_STORE
166170
#pragma pack(pop)
167171
#endif

0 commit comments

Comments
 (0)