aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-04-11 19:26:29 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-04-12 09:35:09 +0200
commit81a9d32f0d4de14eec23160d03721eded78cdf4e (patch)
treeee51327ed0ce4a12256b0189b2af1ed3e6f3efc1
parent0cd17a6291bdd5e3d89dad2bac96393af92ac9bd (diff)
downloadffmpeg-81a9d32f0d4de14eec23160d03721eded78cdf4e.tar.gz
ffmpeg: move getutime to the start of the file.
-rw-r--r--ffmpeg.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 61ec3aeacf..3990f4f823 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -416,6 +416,24 @@ typedef struct OptionsContext {
}\
}
+static int64_t getutime(void)
+{
+#if HAVE_GETRUSAGE
+ struct rusage rusage;
+
+ getrusage(RUSAGE_SELF, &rusage);
+ return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
+#elif HAVE_GETPROCESSTIMES
+ HANDLE proc;
+ FILETIME c, e, k, u;
+ proc = GetCurrentProcess();
+ GetProcessTimes(proc, &c, &e, &k, &u);
+ return ((int64_t) u.dwHighDateTime << 32 | u.dwLowDateTime) / 10;
+#else
+ return av_gettime();
+#endif
+}
+
static void reset_options(OptionsContext *o, int is_input)
{
const OptionDef *po = options;
@@ -4623,24 +4641,6 @@ static int opt_pass(const char *opt, const char *arg)
return 0;
}
-static int64_t getutime(void)
-{
-#if HAVE_GETRUSAGE
- struct rusage rusage;
-
- getrusage(RUSAGE_SELF, &rusage);
- return (rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
-#elif HAVE_GETPROCESSTIMES
- HANDLE proc;
- FILETIME c, e, k, u;
- proc = GetCurrentProcess();
- GetProcessTimes(proc, &c, &e, &k, &u);
- return ((int64_t) u.dwHighDateTime << 32 | u.dwLowDateTime) / 10;
-#else
- return av_gettime();
-#endif
-}
-
static int64_t getmaxrss(void)
{
#if HAVE_GETRUSAGE && HAVE_STRUCT_RUSAGE_RU_MAXRSS