summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-02 21:19:00 +0100
committerwm4 <wm4@nowhere>2013-02-03 16:51:13 +0100
commit3b37fadc5dedae742cf7d9db69c9656b596d8a7c (patch)
treee6b5ff34130e38cc233020a0d8f1faf1aa6a8c44
parentd61408f0da9086883ba71b74c60dd998986ebd19 (diff)
downloadmpv-3b37fadc5dedae742cf7d9db69c9656b596d8a7c.tar.bz2
mpv-3b37fadc5dedae742cf7d9db69c9656b596d8a7c.tar.xz
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.)
-rw-r--r--core/mplayer.c11
-rw-r--r--demux/demux_lavf.c10
2 files changed, 0 insertions, 21 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index 5c1a2d4750..51eef24d20 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -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);
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 1d03d3f217..16b9414560 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -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;