[rtmpdump] r240 - in trunk: hashswf.c rtmpdump.c streams.c
hyc
subversion at mplayerhq.hu
Tue Jan 19 03:26:46 CET 2010
Author: hyc
Date: Tue Jan 19 03:26:45 2010
New Revision: 240
Log:
Allow zero swfAge to force HTTP check every time
Modified:
trunk/hashswf.c
trunk/rtmpdump.c
trunk/streams.c
Modified: trunk/hashswf.c
==============================================================================
--- trunk/hashswf.c Tue Jan 19 01:58:21 2010 (r239)
+++ trunk/hashswf.c Tue Jan 19 03:26:45 2010 (r240)
@@ -327,7 +327,7 @@ RTMP_HashSWF(const char *url, unsigned i
FILE *f = NULL;
char *path, *home, date[64], cctim[64];
long pos = 0;
- time_t ctim = 0, cnow;
+ time_t ctim = -1, cnow;
int i, got = 0, ret = 0;
unsigned int hlen;
struct info in = {0};
@@ -426,7 +426,7 @@ RTMP_HashSWF(const char *url, unsigned i
cnow = time(NULL);
/* If we got a cache time, see if it's young enough to use directly */
- if (got && ctim)
+ if (age && ctim > 0)
{
ctim = cnow - ctim;
ctim /= 3600 * 24; /* seconds to days */
Modified: trunk/rtmpdump.c
==============================================================================
--- trunk/rtmpdump.c Tue Jan 19 01:58:21 2010 (r239)
+++ trunk/rtmpdump.c Tue Jan 19 03:26:45 2010 (r240)
@@ -1398,9 +1398,9 @@ main(int argc, char **argv)
case 'X':
{
int num = atoi(optarg);
- if (num < 1)
+ if (num < 0)
{
- Log(LOGERROR, "SWF Age must be at least 1, ignoring\n");
+ Log(LOGERROR, "SWF Age must be non-negative, ignoring\n");
}
else
{
Modified: trunk/streams.c
==============================================================================
--- trunk/streams.c Tue Jan 19 01:58:21 2010 (r239)
+++ trunk/streams.c Tue Jan 19 03:26:45 2010 (r240)
@@ -1020,9 +1020,9 @@ ParseOption(char opt, char *arg, RTMP_RE
case 'X':
{
int num = atoi(arg);
- if (num <= 0)
+ if (num < 0)
{
- Log(LOGERROR, "SWF Age must be at least 1, ignoring\n");
+ Log(LOGERROR, "SWF Age must be non-negative, ignoring\n");
}
else
{
More information about the rtmpdump
mailing list