diff options
author | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-04-29 21:01:09 +0000 |
---|---|---|
committer | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-04-29 21:01:09 +0000 |
commit | 9318af98420ad7e9926f805b9aa90993c8c2f882 (patch) | |
tree | f7e1cfc931cdb1be4aa413a3daf956d120e4cd5e | |
parent | 50b636db89ed46d19af23f687dfb1e3beb39b2d8 (diff) |
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
-rw-r--r-- | libmpdemux/demux_ogg.c | 7 |
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; |