[MPlayer-cvslog] CVS: main/libaf af_format.c,1.28,1.29

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun May 1 11:02:28 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libaf
In directory mail:/var2/tmp/cvs-serv32365

Modified Files:
	af_format.c 
Log Message:
Error out when invalid format is specified


Index: af_format.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_format.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- af_format.c	24 Feb 2005 16:48:18 -0000	1.28
+++ af_format.c	1 May 2005 09:02:25 -0000	1.29
@@ -139,6 +139,10 @@
   }
   case AF_CONTROL_COMMAND_LINE:{
     int format = af_str2fmt_short(arg);
+    if (format == -1) {
+      af_msg(AF_MSG_ERROR, "[format] %s is not a valid format\n", (char *)arg);
+      return AF_ERROR;
+    }
     if(AF_OK != af->control(af,AF_CONTROL_FORMAT_FMT | AF_CONTROL_SET,&format))
       return AF_ERROR;
     return AF_OK;




More information about the MPlayer-cvslog mailing list