mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 06:03:45 +01:00
subs/demux: don't try to enable sub track when creating it
demuxer.c new_sh_sub_sid() tried to immediately select the created sub track for playback if its id matched the "-sid" option value. This was buggy, as more initialization is needed to properly enable subtitles. Normally the correct track to play is selected after the demuxer has been created. It's possible that some DVD use case or such depended on the removed code to make -sid work with a subtitle track that's not found at start and only added later (vobsubs probably would start playing without separate initialization); if so then that needs to be fixed later in a different way.
This commit is contained in:
parent
8e7dae173d
commit
b86c9e5922
@ -271,10 +271,6 @@ sh_sub_t *new_sh_sub_sid(demuxer_t *demuxer, int id, int sid)
|
||||
sh->opts = demuxer->opts;
|
||||
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SUBTITLE_ID=%d\n", sid);
|
||||
}
|
||||
if (sid == demuxer->opts->sub_id) {
|
||||
demuxer->sub->id = id;
|
||||
demuxer->sub->sh = demuxer->s_streams[id];
|
||||
}
|
||||
return demuxer->s_streams[id];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user