# HG changeset patch # User mosu # Date 1083272469 0 # Node ID af557de9daee8aaa9536b7c3445ff513cf2b7704 # Parent b8465343c991de8d633008c8b925982445493582 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. diff -r b8465343c991 -r af557de9daee libmpdemux/demux_ogg.c --- a/libmpdemux/demux_ogg.c Thu Apr 29 16:48:56 2004 +0000 +++ b/libmpdemux/demux_ogg.c Thu Apr 29 21:01:09 2004 +0000 @@ -961,9 +961,12 @@ 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;