mplayer: move DVB channel skip code

Try not to cause unnecessary special cases.
This commit is contained in:
wm4 2013-04-10 18:50:19 +02:00
parent b99ae74d7d
commit 2c3e5428c2
1 changed files with 21 additions and 23 deletions

View File

@ -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;