summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-10 18:50:19 +0200
committerwm4 <wm4@nowhere>2013-04-10 18:50:19 +0200
commit2c3e5428c2f1a2811ac138a9167aadcef5c7b26d (patch)
treebec01c2d5fa9f77097018bb361eaa17ef77b389c
parentb99ae74d7d8f44d9eebfd742422c9fcb3d70016b (diff)
downloadmpv-2c3e5428c2f1a2811ac138a9167aadcef5c7b26d.tar.bz2
mpv-2c3e5428c2f1a2811ac138a9167aadcef5c7b26d.tar.xz
mplayer: move DVB channel skip code
Try not to cause unnecessary special cases.
-rw-r--r--core/mplayer.c44
1 files changed, 21 insertions, 23 deletions
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;