summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_ogg.c
diff options
context:
space:
mode:
authormosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-29 21:01:09 +0000
committermosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-29 21:01:09 +0000
commit9318af98420ad7e9926f805b9aa90993c8c2f882 (patch)
treef7e1cfc931cdb1be4aa413a3daf956d120e4cd5e /libmpdemux/demux_ogg.c
parent50b636db89ed46d19af23f687dfb1e3beb39b2d8 (diff)
downloadmpv-9318af98420ad7e9926f805b9aa90993c8c2f882.tar.bz2
mpv-9318af98420ad7e9926f805b9aa90993c8c2f882.tar.xz
Leave the subs uninitialized and not "forcefully off" if the user hasn't chosen a stream with -sid. If he used -slang then we need the comment packet which might be found after demux_ogg_open has finished.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12352 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_ogg.c')
-rw-r--r--libmpdemux/demux_ogg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c
index 84d319071a..910312446b 100644
--- a/libmpdemux/demux_ogg.c
+++ b/libmpdemux/demux_ogg.c
@@ -961,9 +961,12 @@ int demux_ogg_open(demuxer_t* demuxer) {
demuxer->audio->id = -2;
else
demuxer->audio->id = audio_id;
- if(!n_text || (text_id < 0))
+ /* Disable the subs only if there are no text streams at all.
+ Otherwise the stream to display might be chosen later when the comment
+ packet is encountered and the user used -slang instead of -sid. */
+ if(!n_text)
demuxer->sub->id = -2;
- else
+ else if (text_id >= 0)
demuxer->sub->id = text_id;
ogg_d->final_granulepos=0;