[Ffmpeg-cvslog] r7174 - trunk/cmdutils.c
gpoirier
subversion
Mon Nov 27 13:37:44 CET 2006
Author: gpoirier
Date: Mon Nov 27 13:37:43 2006
New Revision: 7174
Modified:
trunk/cmdutils.c
Log:
Add support for files that begin with a dash.
Patch by Timo Lindfors % lindi A kurp P hut P fi %
Original thread:
Date: Mon, 27 Nov 2006 02:00:14 +0200
Subject: [Ffmpeg-devel] ffplay confused about filenames that begin with a dash
Modified: trunk/cmdutils.c
==============================================================================
--- trunk/cmdutils.c (original)
+++ trunk/cmdutils.c Mon Nov 27 13:37:43 2006
@@ -59,7 +59,7 @@
void parse_options(int argc, char **argv, const OptionDef *options)
{
const char *opt, *arg;
- int optindex;
+ int optindex, handleoptions;
const OptionDef *po;
/* parse options */
@@ -67,7 +67,11 @@
while (optindex < argc) {
opt = argv[optindex++];
- if (opt[0] == '-' && opt[1] != '\0') {
+ if (handleoptions && opt[0] == '-' && opt[1] != '\0') {
+ if (opt[1] == '-' && opt[2] == '\0') {
+ handleoptions = 0;
+ continue;
+ }
po= find_option(options, opt + 1);
if (!po->name)
po= find_option(options, "default");
More information about the ffmpeg-cvslog
mailing list