From 102946ee0358924f22477435114785bd1f901ade Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Feb 2015 21:10:43 +0100 Subject: player: enable cache and demuxer thread for subtitles too Includes some logic for not starting the demuxer thread for fully read subtitles. (Well, the cache will still waste _lots_ of resources, and the cache always has to be created, because we don't know whether it'll be needed _before_ opening the file.) See #1597. --- demux/demux.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'demux/demux.h') diff --git a/demux/demux.h b/demux/demux.h index cd897be7e2..1d0038a5b0 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -192,6 +192,11 @@ typedef struct demuxer { // monotonically increasing // - seeking leaves packet positions invariant bool allow_refresh_seeks; + // The file data was fully read, and there is no need to keep the stream + // open, keep the cache active, or to run the demuxer thread. Generating + // packets is not slow either (unlike e.g. libavdevice pseudo-demuxers). + // Typical examples: text subtitles, playlists + bool fully_read; // Bitmask of DEMUX_EVENT_* int events; -- cgit v1.2.3