Add note about automatic SWF verification
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Mon, 28 Dec 2009 23:17:26 +0000 (23:17 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Mon, 28 Dec 2009 23:17:26 +0000 (23:17 +0000)
git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@123 400ebc74-4327-4243-bc38-086b20814532

README
rtmpdump.c
streams.c

diff --git a/README b/README
index 3c5de5351cf4faf5254067f37da3d6fb89f4ddbd..ad2a8f987e372e3bc3d8f91c34868c3ef63e8d77 100644 (file)
--- a/README
+++ b/README
@@ -37,6 +37,10 @@ and use the --swfhash "01234..." option to pass it.
 
 e.g. $ ./rtmpdump --swfhash "123456..." --swfsize 987...
 
+Note: all of this is now done automatically if you provide the SWF URL using
+the -W (--swfVfy) option instead of the -s (--swfUrl) option. Also, the hash info
+is cached in ~/.swfinfo so it doesn't need to be recalculated all the time.
+
 Building OpenSSL 0.9.8k
 -----------------------
 arm:
index 63884fdb884df7374ed4e40f976a649b22fe2ae0..50c509c22a0422ffcb191aab16509af0ec9f5690 100644 (file)
@@ -1296,6 +1296,7 @@ main(int argc, char **argv)
            break;
          }
         case 'W':
+         STR2AVAL(swfUrl, optarg);
           if (SWFVerify(optarg, &swfSize, hash) == 0)
             {
               swfHash.av_val = (char *)hash;
index cc9bf1b2e0f98f16ff889e1b1132006bc03e4077..41e982f6bec82d2cee4fa986418da47d501b0223 100644 (file)
--- a/streams.c
+++ b/streams.c
@@ -951,6 +951,8 @@ ParseOption(char opt, char *arg, RTMP_REQUEST * req)
     case 'W':
       {
         unsigned char hash[HASHLEN];
+
+        STR2AVAL(req->swfUrl, arg);
         if (SWFVerify(arg, &req->swfSize, hash) == 0)
           {
             req->swfHash.av_val = malloc(HASHLEN);