changeset 35590:388b4cc85c0e

Allow "nopts" as time specification, it might be useful in some rare cases.
author reimar
date Sat, 15 Dec 2012 19:51:21 +0000
parents ba53cfe2547b
children 912ea01174c1
files m_option.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/m_option.c	Sat Dec 15 19:33:19 2012 +0000
+++ b/m_option.c	Sat Dec 15 19:51:21 2012 +0000
@@ -32,6 +32,7 @@
 #include "m_option.h"
 //#include "m_config.h"
 #include "mp_msg.h"
+#include "mp_global.h"
 #include "stream/url.h"
 #include "libavutil/avstring.h"
 
@@ -1324,7 +1325,10 @@
     *time = 60*a + d;
   else if (sscanf(str, "%lf%n", &d, &len) >= 1)
     *time = d;
-  else
+  else if (strncasecmp(str, "nopts", 5) == 0) {
+    *time = MP_NOPTS_VALUE;
+    len = 5;
+  } else
     return 0; /* unsupported time format */
   if (str[len] && str[len] != endchar)
     return 0; /* invalid extra characters at the end */