Navigation Menu

Skip to content

Commit

Permalink
kodi/amlogic: reduce samba chunk size to 32k to improve playback
Browse files Browse the repository at this point in the history
  • Loading branch information
adamg committed Sep 25, 2018
1 parent 49032bf commit c77f474
Showing 1 changed file with 28 additions and 0 deletions.
@@ -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:

0 comments on commit c77f474

Please sign in to comment.