From c5ad15d8c0f2f41d0a140320cc600655359ed125 Mon Sep 17 00:00:00 2001 From: nicodvb Date: Sat, 15 Dec 2007 13:05:06 +0000 Subject: dvb cleanup: call dvb_(set|step)_channel() without dereferencing stream->priv (1000l to me) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25405 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'command.c') diff --git a/command.c b/command.c index 65afcb5cbe..68b30b9503 100644 --- a/command.c +++ b/command.c @@ -2628,10 +2628,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) #endif /* HAVE_PVR */ } #ifdef HAS_DVBIN_SUPPORT - if ((mpctx->stream->type == STREAMTYPE_DVB) - && mpctx->stream->priv) { - dvb_priv_t *priv = (dvb_priv_t *) mpctx->stream->priv; - if (priv->is_on) { + if (mpctx->stream->type == STREAMTYPE_DVB) { int dir; int v = cmd->args[0].v.i; @@ -2642,9 +2639,8 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) dir = DVB_CHANNEL_LOWER; - if (dvb_step_channel(priv, dir)) + if (dvb_step_channel(mpctx->stream, dir)) mpctx->eof = mpctx->dvbin_reopen = 1; - } } #endif /* HAS_DVBIN_SUPPORT */ break; @@ -2671,19 +2667,12 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) #ifdef HAS_DVBIN_SUPPORT case MP_CMD_DVB_SET_CHANNEL: - if ((mpctx->stream->type == STREAMTYPE_DVB) - && mpctx->stream->priv) { - dvb_priv_t *priv = (dvb_priv_t *) mpctx->stream->priv; - if (priv->is_on) { - if (priv->list->current <= cmd->args[0].v.i) + if (mpctx->stream->type == STREAMTYPE_DVB) { mpctx->last_dvb_step = 1; - else - mpctx->last_dvb_step = -1; if (dvb_set_channel - (priv, cmd->args[1].v.i, cmd->args[0].v.i)) + (mpctx->stream, cmd->args[1].v.i, cmd->args[0].v.i)) mpctx->eof = mpctx->dvbin_reopen = 1; - } } break; #endif /* HAS_DVBIN_SUPPORT */ -- cgit v1.2.3