[MPlayer-cvslog] r35684 - trunk/m_option.c

reimar subversion at mplayerhq.hu
Sat Dec 15 20:51:21 CET 2012


Author: reimar
Date: Sat Dec 15 20:51:21 2012
New Revision: 35684

Log:
Allow "nopts" as time specification, it might be useful in
some rare cases.

Modified:
   trunk/m_option.c

Modified: trunk/m_option.c
==============================================================================
--- trunk/m_option.c	Sat Dec 15 20:33:19 2012	(r35683)
+++ trunk/m_option.c	Sat Dec 15 20:51:21 2012	(r35684)
@@ -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 @@ int parse_timestring(const char *str, do
     *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 */


More information about the MPlayer-cvslog mailing list