Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kodi/amlogic: reduce samba chunk size to 32k to improve playback
origin patch from sam@osmc https://github.com/osmc/osmc/blob/master/package/mediacenter-osmc/patches/vero3-118-SMBFile-read-in-chunks-of-32768K.patch
- Loading branch information
adamg
committed
Sep 25, 2018
1 parent
49032bf
commit c77f474
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
packages/mediacenter/kodi/patches/amlogic/kodi-ce-112-reduce-samba-chunksize-to-32k.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git a/xbmc/platform/posix/filesystem/SMBFile.cpp b/xbmc/platform/posix/filesystem/SMBFile.cpp | ||
index e93b0be..6c72c49 100644 | ||
--- a/xbmc/platform/posix/filesystem/SMBFile.cpp | ||
+++ b/xbmc/platform/posix/filesystem/SMBFile.cpp | ||
@@ -509,8 +509,8 @@ int CSMBFile::Truncate(int64_t size) | ||
|
||
ssize_t CSMBFile::Read(void *lpBuf, size_t uiBufSize) | ||
{ | ||
- if (uiBufSize > SSIZE_MAX) | ||
- uiBufSize = SSIZE_MAX; | ||
+ if (uiBufSize > 32768) | ||
+ uiBufSize = 32768; | ||
|
||
if (m_fd == -1) | ||
return -1; | ||
diff --git a/xbmc/platform/posix/filesystem/SMBFile.h b/xbmc/platform/posix/filesystem/SMBFile.h | ||
index 8947722..fd08496 100644 | ||
--- a/xbmc/platform/posix/filesystem/SMBFile.h | ||
+++ b/xbmc/platform/posix/filesystem/SMBFile.h | ||
@@ -77,7 +77,7 @@ public: | ||
bool OpenForWrite(const CURL& url, bool bOverWrite = false) override; | ||
bool Delete(const CURL& url) override; | ||
bool Rename(const CURL& url, const CURL& urlnew) override; | ||
- int GetChunkSize() override { return 64*1024; } | ||
+ int GetChunkSize() override { return 32*1024; } | ||
int IoControl(EIoControl request, void* param) override; | ||
|
||
protected: |