From 94dd9c41f4cd048baa3b62193a7a5c215c0ed8b1 Mon Sep 17 00:00:00 2001 From: Damien Merenne Date: Thu, 12 Mar 2015 10:23:29 +0100 Subject: [PATCH] Fix AES decryption of HLS streams. As per http://tools.ietf.org/html/draft-pantos-http-live-streaming-04#section-5.2, the initializaton vector (IV) of the AES decryption algorithm should be set to: - the IV attribute value if present, - the sequence number otherwise. Currently, the IV is set once and use over all next media sequences where the IV attribute is not set. The fix is to use the provided IV if given or use the current media sequence number. --- .../android/exoplayer/hls/HlsPlaylistParser.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/library/src/main/java/com/google/android/exoplayer/hls/HlsPlaylistParser.java b/library/src/main/java/com/google/android/exoplayer/hls/HlsPlaylistParser.java index 76db4d773e..5c7b23f865 100644 --- a/library/src/main/java/com/google/android/exoplayer/hls/HlsPlaylistParser.java +++ b/library/src/main/java/com/google/android/exoplayer/hls/HlsPlaylistParser.java @@ -233,9 +233,6 @@ public final class HlsPlaylistParser implements NetworkLoadable.Parser