summaryrefslogtreecommitdiffstats
path: root/stream/tv.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-08 01:26:13 +0200
committerwm4 <wm4@nowhere>2013-07-08 01:36:02 +0200
commit05ae5afd6249af9770eb1e55104fbd4f510c2342 (patch)
treeed527373fe42a37f24d4eb43a7a7721d7145fd38 /stream/tv.c
parent50808bab8db030acd07433e58465d1e71bca2269 (diff)
downloadmpv-05ae5afd6249af9770eb1e55104fbd4f510c2342.tar.bz2
mpv-05ae5afd6249af9770eb1e55104fbd4f510c2342.tar.xz
demux: remove separate arrays for audio/video/sub streams, simplify
These separate arrays were used by the old demuxers and are not needed anymore. We can simplify track switching as well. One interesting thing is that stream/tv.c (which is a demuxer) won't respect --no-audio anymore. It will probably work as expected, but it will still open an audio device etc. - this is because track selection is now always done with the runtime track switching mechanism. Maybe the TV code could be updated to do proper runtime switching, but I can't test this stuff.
Diffstat (limited to 'stream/tv.c')
-rw-r--r--stream/tv.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/stream/tv.c b/stream/tv.c
index 83a0052563..e5768a350a 100644
--- a/stream/tv.c
+++ b/stream/tv.c
@@ -739,20 +739,12 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer)
tvh->tv_param->noaudio = 1;
}
- /* disable TV audio if -nosound is present */
- if (!demuxer->audio || demuxer->audio->id == -2) {
- tvh->tv_param->noaudio = 1;
- }
-
/* set width */
funcs->control(tvh->priv, TVI_CONTROL_VID_GET_WIDTH, &sh_video->disp_w);
/* set height */
funcs->control(tvh->priv, TVI_CONTROL_VID_GET_HEIGHT, &sh_video->disp_h);
- demuxer->video->sh = sh_video;
- sh_video->ds = demuxer->video;
- demuxer->video->id = 0;
demuxer->seekable = 0;
/* here comes audio init */
@@ -818,10 +810,6 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer)
mp_tmsg(MSGT_DECVIDEO, MSGL_V, " TV audio: %d channels, %d bits, %d Hz\n",
sh_audio->wf->nChannels, sh_audio->wf->wBitsPerSample,
sh_audio->wf->nSamplesPerSec);
-
- demuxer->audio->sh = sh_audio;
- sh_audio->ds = demuxer->audio;
- demuxer->audio->id = 0;
}
no_audio: