From 05ae5afd6249af9770eb1e55104fbd4f510c2342 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 8 Jul 2013 01:26:13 +0200 Subject: 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. --- stream/tv.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'stream/tv.c') 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: -- cgit v1.2.3