1
mirror of https://github.com/mpv-player/mpv synced 2024-10-14 11:54:36 +02:00

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
This commit is contained in:
mosu 2004-04-29 21:01:09 +00:00
parent 50b636db89
commit 9318af9842

View File

@ -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;