[FFmpeg-cvslog] rtmpproto: Fix limelight authentication with abbreviated app names

Martin Storsjö git at videolan.org
Thu Aug 29 13:49:23 CEST 2013


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Aug 15 13:17:15 2013 +0300| [6454c44f9f74dbaed17d32cf0eaec185386c27fa] | committer: Martin Storsjö

rtmpproto: Fix limelight authentication with abbreviated app names

When streaming to limelight, the app name is either a full
"appname/subaccount" or "appname/_definst_". In the latter case,
the app name can be simplified into simply "appname", but the
authentication hashing assumes the /_definst_ still to be present.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6454c44f9f74dbaed17d32cf0eaec185386c27fa
---

 libavformat/rtmpproto.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 4de20f2..48eed56 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1612,6 +1612,8 @@ static int do_llnw_auth(RTMPContext *rt, const char *user, const char *nonce)
     av_md5_update(md5, method, strlen(method));
     av_md5_update(md5, ":/", 2);
     av_md5_update(md5, rt->app, strlen(rt->app));
+    if (!strchr(rt->app, '/'))
+        av_md5_update(md5, "/_definst_", strlen("/_definst_"));
     av_md5_final(md5, hash);
     ff_data_to_hex(hashstr2, hash, 16, 1);
     hashstr2[32] = '\0';



More information about the ffmpeg-cvslog mailing list