[Ffmpeg-cvslog] r7389 - trunk/ffplay.c

michael subversion
Sun Dec 31 19:09:21 CET 2006


Author: michael
Date: Sun Dec 31 19:09:21 2006
New Revision: 7389

Modified:
   trunk/ffplay.c

Log:
check x/y validity
a more generic solution is welcome of course ...


Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	(original)
+++ trunk/ffplay.c	Sun Dec 31 19:09:21 2006
@@ -2308,11 +2308,19 @@
 void opt_width(const char *arg)
 {
     screen_width = atoi(arg);
+    if(screen_width<=0){
+        fprintf(stderr, "invalid width\n");
+        exit(1);
+    }
 }
 
 void opt_height(const char *arg)
 {
     screen_height = atoi(arg);
+    if(screen_height<=0){
+        fprintf(stderr, "invalid height\n");
+        exit(1);
+    }
 }
 
 static void opt_format(const char *arg)




More information about the ffmpeg-cvslog mailing list