diff 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
line wrap: on
line diff
--- a/command.c	Mon Oct 27 22:34:33 2008 +0000
+++ b/command.c	Mon Oct 27 22:44:09 2008 +0000
@@ -1949,6 +1949,8 @@
     tvi_handle_t *tvh = mpctx->demuxer->priv;
     int result;
     int val;
+    if (mpctx->demuxer->type != DEMUXER_TYPE_TV || !tvh)
+        return M_PROPERTY_UNAVAILABLE;
     switch(action){
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN: