From a20db8a35cf2050b3d646abdcd06ff21c8f53ee7 Mon Sep 17 00:00:00 2001 From: Eduardo Bragatto Date: Wed, 9 Jan 2008 20:48:02 +0000 Subject: [PATCH] Initialize correctly optind. Patch by Eduardo Bragatto, his name at his surname dot com Thread http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-January/039835.html Originally committed as revision 11483 to svn://svn.ffmpeg.org/ffmpeg/trunk --- vhook/drawtext.c | 2 +- vhook/fish.c | 2 +- vhook/imlib2.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vhook/drawtext.c b/vhook/drawtext.c index 5001c4b5fa..d3ca767fe5 100644 --- a/vhook/drawtext.c +++ b/vhook/drawtext.c @@ -172,7 +172,7 @@ int Configure(void **ctxp, int argc, char *argv[]) ci->outline = 0; ci->text_height = 0; - optind = 0; + optind = 1; while ((c = getopt(argc, argv, "f:t:T:x:y:s:c:C:bo")) > 0) { switch (c) { case 'f': diff --git a/vhook/fish.c b/vhook/fish.c index 1571cf9b95..be23dc644a 100644 --- a/vhook/fish.c +++ b/vhook/fish.c @@ -124,7 +124,7 @@ int Configure(void **ctxp, int argc, char *argv[]) *ctxp = av_mallocz(sizeof(ContextInfo)); ci = (ContextInfo *) *ctxp; - optind = 0; + optind = 1; ci->dir = "/tmp"; ci->threshold = 100; diff --git a/vhook/imlib2.c b/vhook/imlib2.c index 1626f587d4..7df4c0acad 100644 --- a/vhook/imlib2.c +++ b/vhook/imlib2.c @@ -160,7 +160,7 @@ int Configure(void **ctxp, int argc, char *argv[]) ci->expr_x = "0.0"; ci->expr_y = "0.0"; - optind = 0; + optind = 1; /* Use ':' to split FONTPATH */ if (fp)