From 2c3e5428c2f1a2811ac138a9167aadcef5c7b26d Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 10 Apr 2013 18:50:19 +0200 Subject: mplayer: move DVB channel skip code Try not to cause unnecessary special cases. --- core/mplayer.c | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'core/mplayer.c') diff --git a/core/mplayer.c b/core/mplayer.c index 1d13b1b930..ee1df36654 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -4021,29 +4021,6 @@ goto_enable_cache: ; reinit_audio_chain(mpctx); reinit_subs(mpctx); - //================== MAIN: ========================== - - if (!mpctx->sh_video && !mpctx->sh_audio) { - mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, - "No video or audio streams selected.\n"); -#ifdef CONFIG_DVBIN - if (mpctx->stream->type == STREAMTYPE_DVB) { - int dir; - int v = mpctx->last_dvb_step; - if (v > 0) - dir = DVB_CHANNEL_HIGHER; - else - dir = DVB_CHANNEL_LOWER; - - if (dvb_step_channel(mpctx->stream, dir)) { - mpctx->stop_play = PT_NEXT_ENTRY; - mpctx->dvbin_reopen = 1; - } - } -#endif - goto terminate_playback; - } - //================ SETUP STREAMS ========================== if (mpctx->sh_video) { @@ -4078,6 +4055,27 @@ goto_enable_cache: ; //==================== START PLAYING ======================= + if (!mpctx->sh_video && !mpctx->sh_audio) { + mp_tmsg(MSGT_CPLAYER, MSGL_FATAL, + "No video or audio streams selected.\n"); +#ifdef CONFIG_DVBIN + if (mpctx->stream->type == STREAMTYPE_DVB) { + int dir; + int v = mpctx->last_dvb_step; + if (v > 0) + dir = DVB_CHANNEL_HIGHER; + else + dir = DVB_CHANNEL_LOWER; + + if (dvb_step_channel(mpctx->stream, dir)) { + mpctx->stop_play = PT_NEXT_ENTRY; + mpctx->dvbin_reopen = 1; + } + } +#endif + goto terminate_playback; + } + mp_tmsg(MSGT_CPLAYER, MSGL_V, "Starting playback...\n"); mpctx->drop_frame_cnt = 0; -- cgit v1.2.3