rtmpproto: send swfverify value as swfurl if latter is unused
authorRicardo Constantino <wiiaboo@gmail.com>
Mon, 20 Mar 2017 20:28:09 +0000 (20:28 +0000)
committerMartin Storsjö <martin@martin.st>
Sun, 26 Mar 2017 10:29:56 +0000 (13:29 +0300)
Replicates lavf/librtmp.c behavior in L145-152 and rtmpdump's
behavior with "--swfVfy <url>" passing the url to swfUrl.

Fixes bug 943.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtmpproto.c

index 7d40227..115c335 100644 (file)
@@ -339,9 +339,12 @@ static int gen_connect(URLContext *s, RTMPContext *rt)
     ff_amf_write_field_name(&p, "flashVer");
     ff_amf_write_string(&p, rt->flashver);
 
-    if (rt->swfurl) {
+    if (rt->swfurl || rt->swfverify) {
         ff_amf_write_field_name(&p, "swfUrl");
-        ff_amf_write_string(&p, rt->swfurl);
+        if (rt->swfurl)
+            ff_amf_write_string(&p, rt->swfurl);
+        else
+            ff_amf_write_string(&p, rt->swfverify);
     }
 
     ff_amf_write_field_name(&p, "tcUrl");