summaryrefslogtreecommitdiff
path: root/libavformat/rtmpcrypt.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-11-11 22:11:19 +0200
committerMartin Storsjö <martin@martin.st>2015-11-13 21:53:57 +0200
commit588b6215b4c74945994eb9636b0699028c069ed2 (patch)
treea3fa726d8df4c1a9624440e8b102e6f2544337db /libavformat/rtmpcrypt.c
parent92d107a17127c29036b71e53315a2c702960819a (diff)
rtmpcrypt: Do the xtea decryption in little endian mode
The XTEA algorithm operates on 32 bit numbers, not on byte sequences. The XTEA implementation in libavutil is written assuming big endian numbers, while the rtmpe signature encryption assumes little endian. This fixes rtmpe communication with rtmpe servers that use signature type 8 (XTEA), e.g. crunchyroll. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtmpcrypt.c')
-rw-r--r--libavformat/rtmpcrypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtmpcrypt.c b/libavformat/rtmpcrypt.c
index 887427d205..829c280776 100644
--- a/libavformat/rtmpcrypt.c
+++ b/libavformat/rtmpcrypt.c
@@ -186,7 +186,7 @@ static void rtmpe8_sig(const uint8_t *in, uint8_t *out, int key_id)
struct AVXTEA ctx;
av_xtea_init(&ctx, rtmpe8_keys[key_id]);
- av_xtea_crypt(&ctx, out, in, 1, NULL, 0);
+ av_xtea_le_crypt(&ctx, out, in, 1, NULL, 0);
}
static void rtmpe9_sig(const uint8_t *in, uint8_t *out, int key_id)