# HG changeset patch # User reimar # Date 1355601081 0 # Node ID 388b4cc85c0e42a637c10d4d4c3fe6f5c53f7b23 # Parent ba53cfe2547bd5d394fcb644d52ab0925bc9c34b Allow "nopts" as time specification, it might be useful in some rare cases. diff -r ba53cfe2547b -r 388b4cc85c0e m_option.c --- 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 */