diff options
author | thexai <58434170+thexai@users.noreply.github.com> | 2024-05-05 09:01:57 +0200 |
---|---|---|
committer | thexai <58434170+thexai@users.noreply.github.com> | 2024-05-05 09:01:57 +0200 |
commit | 6a60cedd70e7ab4a9d71662e844dd01e49ed5749 (patch) | |
tree | 4b0dd53e5d6f06b83ced405a7977447354a2ab2e | |
parent | 058a35d43e571c52193c8652182eb65f6cc9f61b (diff) | |
download | xbmc-6a60cedd70e7ab4a9d71662e844dd01e49ed5749.tar.xz |
[FileSystem] Fix playback stop when read external SRT subtitles files
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamFile.cpp | 2 | ||||
-rw-r--r-- | xbmc/filesystem/File.cpp | 3 | ||||
-rw-r--r-- | xbmc/filesystem/IFileTypes.h | 3 |
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; |