summaryrefslogtreecommitdiffstats
path: root/core/mp_core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-01 19:43:11 +0200
committerwm4 <wm4@nowhere>2013-06-01 19:43:11 +0200
commit27d383918a3d63559c85ca96b2162a13234f2abc (patch)
treedaac6d3fbbfece956e72189a032866f093b42764 /core/mp_core.h
parentf7b9b92179333e5bf399cbb6289b66ed3439445c (diff)
downloadmpv-27d383918a3d63559c85ca96b2162a13234f2abc.tar.bz2
mpv-27d383918a3d63559c85ca96b2162a13234f2abc.tar.xz
core: add demux_sub pseudo demuxer
Subtitle files are opened in mplayer.c, not using the demuxer infrastructure in general. Pretend that this is not the case (outside of the loading code) by opening a pseudo demuxer that does nothing. One advantage is that the initialization code is now the same, and there's no confusion about what the difference between track->stream, track->sh_sub and mpctx->sh_sub is supposed to be. This is a bit stupid, and it would be much better if there were proper subtitle demuxers (there are many in recent FFmpeg, but not Libav). So for now this is just a transition to a more proper architecture. Look at demux_sub like an artifical limb: it's ugly, but don't hate it - it helps you to get on with your life.
Diffstat (limited to 'core/mp_core.h')
-rw-r--r--core/mp_core.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/mp_core.h b/core/mp_core.h
index db6bc570e1..d7aa42e38d 100644
--- a/core/mp_core.h
+++ b/core/mp_core.h
@@ -103,12 +103,9 @@ struct track {
// Invariant: (!demuxer && !stream) || stream->demuxer == demuxer
struct sh_stream *stream;
- // NOTE: demuxer subtitles, i.e. if stream!=NULL, do not use the following
- // fields. The data is stored in stream->sub this case.
-
- // External text subtitle using libass subtitle renderer.
- // The sh_sub is a dummy and doesn't belong to a demuxer.
- struct sh_sub *sh_sub;
+ // For external subtitles, which are read fully on init. Do not attempt
+ // to read packets from them.
+ bool preloaded;
};
enum {