[rtmpdump] r266 - in tags/rel-2.1d: . hashswf.c rtmpsrv.c
hyc
subversion at mplayerhq.hu
Sun Feb 21 05:50:52 CET 2010
Author: hyc
Date: Sun Feb 21 05:50:51 2010
New Revision: 266
Log:
Resync
Modified:
tags/rel-2.1d/ (props changed)
tags/rel-2.1d/hashswf.c
tags/rel-2.1d/rtmpsrv.c
Modified: tags/rel-2.1d/hashswf.c
==============================================================================
--- tags/rel-2.1d/hashswf.c Sun Feb 21 05:47:22 2010 (r265)
+++ tags/rel-2.1d/hashswf.c Sun Feb 21 05:50:51 2010 (r266)
@@ -260,6 +260,11 @@ leave:
return ret;
}
+static int tzoff;
+static int tzchecked;
+
+#define JAN02_1980 318340800
+
static const char *monthtab[12] = {"Jan", "Feb", "Mar",
"Apr", "May", "Jun",
"Jul", "Aug", "Sep",
@@ -321,12 +326,24 @@ make_unix_time(char *s)
break;
}
time.tm_isdst = 0; /* daylight saving is never in effect in GMT */
+
+ /* this is normally the value of extern int timezone, but some
+ * braindead C libraries don't provide it.
+ */
+ if (!tzchecked)
+ {
+ struct tm *tc;
+ time_t then = JAN02_1980;
+ tc = localtime(&then);
+ tzoff = (12 - tc->tm_hour) * 3600 + tc->tm_min * 60 + tc->tm_sec;
+ tzchecked = 1;
+ }
res = mktime(&time);
/* Unfortunately, mktime() assumes the input is in local time,
* not GMT, so we have to correct it here.
*/
if (res != -1)
- res += timezone;
+ res += tzoff;
return res;
}
Modified: tags/rel-2.1d/rtmpsrv.c
==============================================================================
--- tags/rel-2.1d/rtmpsrv.c Sun Feb 21 05:47:22 2010 (r265)
+++ tags/rel-2.1d/rtmpsrv.c Sun Feb 21 05:50:51 2010 (r266)
@@ -39,9 +39,12 @@
#include "thread.h"
#ifdef linux
+#include <linux/netfilter_ipv4.h>
+#endif
+
+#ifndef WIN32
#include <sys/types.h>
#include <sys/wait.h>
-#include <linux/netfilter_ipv4.h>
#endif
#define RD_SUCCESS 0
More information about the rtmpdump
mailing list