diff options
author | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-15 13:05:06 +0000 |
---|---|---|
committer | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-15 13:05:06 +0000 |
commit | c5ad15d8c0f2f41d0a140320cc600655359ed125 (patch) | |
tree | 262f5a7eb5aee4a3648f129093e1c60a6035587e /command.c | |
parent | 9c189c49bfeb1f07753952734881218af3d2358d (diff) | |
download | mpv-c5ad15d8c0f2f41d0a140320cc600655359ed125.tar.bz2 mpv-c5ad15d8c0f2f41d0a140320cc600655359ed125.tar.xz |
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
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 19 |
1 files changed, 4 insertions, 15 deletions
@@ -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 */ |