mirror of https://github.com/mpv-player/mpv
demux_lavf: remove weird stream auto-selection
Should be dead code. Stream selection is handled either during demuxer initialization, or via DEMUXER_CTRL_SWITCH_*. (If there were actually situations where this code did something, it was probably broken anyway.)
This commit is contained in:
parent
d61408f0da
commit
3b37fadc5d
|
@ -3226,17 +3226,6 @@ static void run_playloop(struct MPContext *mpctx)
|
|||
mpctx->stop_play = PT_NEXT_ENTRY;
|
||||
}
|
||||
|
||||
// Possibly needed for stream auto selection in demux_lavf (?)
|
||||
if (!mpctx->sh_audio && mpctx->master_demuxer->audio->sh) {
|
||||
for (int n = 0; n < mpctx->num_tracks; n++) {
|
||||
if (mpctx->tracks[n]->stream == ds_gsh(mpctx->master_demuxer->audio)) {
|
||||
mpctx->current_track[STREAM_AUDIO] = mpctx->tracks[n];
|
||||
break;
|
||||
}
|
||||
}
|
||||
reinit_audio_chain(mpctx);
|
||||
}
|
||||
|
||||
if (mpctx->step_frames && !mpctx->sh_video) {
|
||||
mpctx->step_frames = 0;
|
||||
pause_player(mpctx);
|
||||
|
|
|
@ -785,19 +785,9 @@ static int demux_lavf_fill_buffer(demuxer_t *demux, demux_stream_t *dsds)
|
|||
if (id == demux->audio->id) {
|
||||
// audio
|
||||
ds = demux->audio;
|
||||
if (!ds->sh) {
|
||||
ds->sh = demux->a_streams[id];
|
||||
mp_msg(MSGT_DEMUX, MSGL_V, "Auto-selected LAVF audio ID = %d\n",
|
||||
ds->id);
|
||||
}
|
||||
} else if (id == demux->video->id) {
|
||||
// video
|
||||
ds = demux->video;
|
||||
if (!ds->sh) {
|
||||
ds->sh = demux->v_streams[id];
|
||||
mp_msg(MSGT_DEMUX, MSGL_V, "Auto-selected LAVF video ID = %d\n",
|
||||
ds->id);
|
||||
}
|
||||
} else if (id == demux->sub->id) {
|
||||
// subtitle
|
||||
ds = demux->sub;
|
||||
|
|
Loading…
Reference in New Issue