Message ID | 20170320202251.2864-1-wiiaboo@gmail.com |
---|---|
State | Accepted |
Commit | d4f3c26b700ae847433ba3c67dc99c32bc1fd4a1 |
Headers | show |
Ping.
On Mon, Mar 20, 2017 at 08:22:51PM +0000, Ricardo Constantino wrote: > Replicates lavf/librtmp.c behavior in L149-156 and rtmpdump's > behavior with "--swfVfy <url>" passing the url to swfUrl. > > Fixes trac ticket #5549. > --- > libavformat/rtmpproto.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c > index 5d7ad795ed..cecb6b4d9f 100644 > --- a/libavformat/rtmpproto.c > +++ b/libavformat/rtmpproto.c > @@ -341,9 +341,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); lavf/librtmp.c adds " swfVfy=1" why does this here not ? [...]
On 27 March 2017 at 00:15, Michael Niedermayer <michael@niedermayer.cc> wrote: > On Mon, Mar 20, 2017 at 08:22:51PM +0000, Ricardo Constantino wrote: > > Replicates lavf/librtmp.c behavior in L149-156 and rtmpdump's > > behavior with "--swfVfy <url>" passing the url to swfUrl. > > > > Fixes trac ticket #5549. > > --- > > libavformat/rtmpproto.c | 7 +++++-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c > > index 5d7ad795ed..cecb6b4d9f 100644 > > --- a/libavformat/rtmpproto.c > > +++ b/libavformat/rtmpproto.c > > @@ -341,9 +341,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); > > lavf/librtmp.c adds " swfVfy=1" > why does this here not ? > The field name is swfUrl in both librtmp.c and rtmpproto. In lavf/librtmp.c, -rtmp_swfverify accepts the swf URL and librtmp computes the hash if swfVfy=1 and sets swfUrl to the value of rtmp_swfverify. In lavf/rtmpproto.c, -rtmp_swfverify only computes the hash but doesn't set swfUrl which is needed by the server, so you need to repeat the same URL to -rtmp_swfurl. In rtmpdump binary, there's both --swfUrl and --swfVfy and both take the swf url, but the latter also sets swfUrl while also setting swfVfy=1 which is needed to prompt librtmp to compute the hash. That's my interpretation of it, no idea if it is absolutely correct, since I don't have a lot of RTMP sources to check.
Ping.
Third ping. This patch is trivial, and makes behavior of librtmp and ffrtmp consistent when using rtmp_swfverify. What's blocking this?
On Sat, May 06, 2017 at 01:13:41PM +0100, Ricardo Constantino wrote: > Third ping. > > This patch is trivial, and makes behavior of librtmp and ffrtmp consistent > when using rtmp_swfverify. > > What's blocking this? lack of maintainer for this code If you would be interrested in maintaining this, dont hesitate to suggest it and or send a patch that adds you to the MAINTAINERs file [...]
On 6 May 2017 at 23:05, Michael Niedermayer <michael@niedermayer.cc> wrote: > On Sat, May 06, 2017 at 01:13:41PM +0100, Ricardo Constantino wrote: > > Third ping. > > > > This patch is trivial, and makes behavior of librtmp and ffrtmp > consistent > > when using rtmp_swfverify. > > > > What's blocking this? > > lack of maintainer for this code > > If you would be interrested in maintaining this, dont hesitate to > suggest it and or send a patch that adds you to the > MAINTAINERs file > I wouldn't feel comfortable with such responsability. FWIW, Martin Storjö accepted the same patch in Libav: https://git.libav.org/?p=libav.git;a=commit;h=d4f3c26b700ae847433ba3c67dc99c32bc1fd4a1
On Sat, May 06, 2017 at 11:13:10PM +0100, Ricardo Constantino wrote: > On 6 May 2017 at 23:05, Michael Niedermayer <michael@niedermayer.cc> wrote: > > > On Sat, May 06, 2017 at 01:13:41PM +0100, Ricardo Constantino wrote: > > > Third ping. > > > > > > This patch is trivial, and makes behavior of librtmp and ffrtmp > > consistent > > > when using rtmp_swfverify. > > > > > > What's blocking this? > > > > lack of maintainer for this code > > > > If you would be interrested in maintaining this, dont hesitate to > > suggest it and or send a patch that adds you to the > > MAINTAINERs file > > > > > I wouldn't feel comfortable with such responsability. ok patch applied > FWIW, Martin Storjö accepted the same patch in Libav: > https://git.libav.org/?p=libav.git;a=commit;h=d4f3c26b700ae847433ba3c67dc99c32bc1fd4a1 > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 5d7ad795ed..cecb6b4d9f 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -341,9 +341,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");