diff options
author | Martin Storsjö <martin@martin.st> | 2013-08-15 13:17:15 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-08-28 17:54:51 +0300 |
commit | 6454c44f9f74dbaed17d32cf0eaec185386c27fa (patch) | |
tree | 6ed596e6cdf6bd6cbfac8d573ff69d72c27eebf9 /libavformat/rtmpproto.c | |
parent | cb8f70c96e14c1b4824ef23d21d78d10fc5a4b93 (diff) | |
download | ffmpeg-6454c44f9f74dbaed17d32cf0eaec185386c27fa.tar.gz |
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@martin.st>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r-- | libavformat/rtmpproto.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 4de20f2ed9..48eed561d2 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'; |