comparison command.c @ 27806:26c27a80b8af

Disallow the modification of teletext properties when the tv demuxer is not active.
author faust3
date Mon, 27 Oct 2008 22:44:09 +0000
parents 99838ea34e55
children 92e770f6e890
comparison
equal deleted inserted replaced
27805:92f83263b154 27806:26c27a80b8af
1947 MPContext * mpctx) 1947 MPContext * mpctx)
1948 { 1948 {
1949 tvi_handle_t *tvh = mpctx->demuxer->priv; 1949 tvi_handle_t *tvh = mpctx->demuxer->priv;
1950 int result; 1950 int result;
1951 int val; 1951 int val;
1952 if (mpctx->demuxer->type != DEMUXER_TYPE_TV || !tvh)
1953 return M_PROPERTY_UNAVAILABLE;
1952 switch(action){ 1954 switch(action){
1953 case M_PROPERTY_STEP_UP: 1955 case M_PROPERTY_STEP_UP:
1954 case M_PROPERTY_STEP_DOWN: 1956 case M_PROPERTY_STEP_DOWN:
1955 //This should be handled separately 1957 //This should be handled separately
1956 val = (arg ? *(int *) arg : 1) * (action == M_PROPERTY_STEP_DOWN ? -1 : 1); 1958 val = (arg ? *(int *) arg : 1) * (action == M_PROPERTY_STEP_DOWN ? -1 : 1);