[Mplayer-cvslog] CVS: main/libmpdemux tv.c,1.41,1.42

Jindrich Makovicka CVS henry at mplayerhq.hu
Tue Dec 17 00:27:43 CET 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv10997

Modified Files:
	tv.c 
Log Message:
handle bogus norm parameter; check for errors when setting norm

Index: tv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tv.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- tv.c	16 Dec 2002 17:05:49 -0000	1.41
+++ tv.c	16 Dec 2002 23:27:39 -0000	1.42
@@ -159,21 +159,16 @@
 	tvh->norm = TV_NORM_NTSC;
     else if (!strcasecmp(tv_param_norm, "secam"))
 	tvh->norm = TV_NORM_SECAM;
-    else if (!strcasecmp(tv_param_norm, "palnc"))
-	tvh->norm = TV_NORM_PALNC;
-    else if (!strcasecmp(tv_param_norm, "palm"))
-	tvh->norm = TV_NORM_PALM;
-    else if (!strcasecmp(tv_param_norm, "paln"))
-	tvh->norm = TV_NORM_PALN;
-    else if (!strcasecmp(tv_param_norm, "ntscjp"))
-	tvh->norm = TV_NORM_NTSCJP;
     else {
 	mp_msg(MSGT_TV, MSGL_V, "Bogus norm parameter, setting PAL.\n");
 	tvh->norm = TV_NORM_PAL;
     }
 
     mp_msg(MSGT_TV, MSGL_V, "Selected norm: %s\n", tv_param_norm);
-    funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm);
+    if (funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) {
+	mp_msg(MSGT_TV, MSGL_ERR, "Error: cannot set norm!\n");
+	return 0;
+    }
 
     /* limits on w&h are norm-dependent -- JM */
     /* set width */




More information about the MPlayer-cvslog mailing list