Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use READ_NO_BUFFER for opening files with Kodi Omega 21.1 #207

Open
wants to merge 2 commits into
base: Omega
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pvr.mediaportal.tvserver/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.mediaportal.tvserver"
version="21.0.2"
version="21.0.3"
name="MediaPortal PVR Client"
provider-name="Marcel Groothuis">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.mediaportal.tvserver/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v21.0.3
- Use READ_NO_BUFFER for opening files with Kodi Omega 21.1

v21.0.2
- Update FileReader open mode so it is compatible with Kodi Omega

Expand Down
5 changes: 4 additions & 1 deletion src/lib/tsreader/FileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
/* calcuate bitrate for file while reading */
#define READ_BITRATE 0x10

/* cindicate that caller want open a file without intermediate buffer regardless to file type */
#define READ_NO_BUFFER 0x200

template<typename T> void SafeDelete(T*& p)
{
if (p)
Expand Down Expand Up @@ -125,7 +128,7 @@ namespace MPTV
do
{
kodi::Log(ADDON_LOG_INFO, "FileReader::OpenFile() %s.", m_fileName.c_str());
if (m_hFile.OpenFile(m_fileName, READ_NO_CACHE | READ_TRUNCATED | READ_BITRATE))
if (m_hFile.OpenFile(m_fileName, READ_NO_BUFFER))
{
break;
}
Expand Down