aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamFile.cpp2
-rw-r--r--xbmc/filesystem/File.cpp3
-rw-r--r--xbmc/filesystem/IFileTypes.h3
3 files changed, 8 insertions, 0 deletions
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamFile.cpp b/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamFile.cpp
index 9ebd8d2c53..91603ac1f0 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamFile.cpp
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamFile.cpp
@@ -48,6 +48,8 @@ bool CDVDInputStreamFile::Open()
// If this file is audio and/or video (= not a subtitle) flag to caller
if (!VIDEO::IsSubtitle(m_item))
flags |= READ_AUDIO_VIDEO;
+ else
+ flags |= READ_NO_BUFFER; // disable CFileStreamBuffer for subtitles
std::string content = m_item.GetMimeType();
diff --git a/xbmc/filesystem/File.cpp b/xbmc/filesystem/File.cpp
index fe1e60c090..cfea9ac4a1 100644
--- a/xbmc/filesystem/File.cpp
+++ b/xbmc/filesystem/File.cpp
@@ -386,6 +386,9 @@ bool CFile::Open(const CURL& file, const unsigned int flags)
bool CFile::ShouldUseStreamBuffer(const CURL& url)
{
+ if (m_flags & READ_NO_BUFFER)
+ return false;
+
if (m_flags & READ_CHUNKED || m_pFile->GetChunkSize() > 0)
return true;
diff --git a/xbmc/filesystem/IFileTypes.h b/xbmc/filesystem/IFileTypes.h
index 4f594ca291..1f89350cc9 100644
--- a/xbmc/filesystem/IFileTypes.h
+++ b/xbmc/filesystem/IFileTypes.h
@@ -40,6 +40,9 @@ namespace XFILE
/* indicate that caller want to reopen a file if its already open */
static const unsigned int READ_REOPEN = 0x100;
+/* indicate that caller want open a file without intermediate buffer regardless to file type */
+ static const unsigned int READ_NO_BUFFER = 0x200;
+
struct SNativeIoControl
{
unsigned long int request;