aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-12-31 18:09:21 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-12-31 18:09:21 +0000
commitcfe9cfede815dc8212b7be637d7253e5ff8a40ed (patch)
tree2c46d74e0f1d5507a1a99c02995ae15aceab3fe1 /ffplay.c
parent990c84384fe6de769300cb999f36525f9fccd1d9 (diff)
downloadffmpeg-cfe9cfede815dc8212b7be637d7253e5ff8a40ed.tar.gz
check x/y validity
a more generic solution is welcome of course ... Originally committed as revision 7389 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index a97924e63e..7aab007492 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2308,11 +2308,19 @@ static void event_loop(void)
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)