From abac6b7dd6662bb4893566a4a04bf9804ee0599d Mon Sep 17 00:00:00 2001 From: Oliver Woodman Date: Wed, 18 Feb 2015 19:11:52 +0000 Subject: [PATCH] Fix off-by-one-bug preventing NAL unit detection at the limit. --- .../src/main/java/com/google/android/exoplayer/mp4/Mp4Util.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/google/android/exoplayer/mp4/Mp4Util.java b/library/src/main/java/com/google/android/exoplayer/mp4/Mp4Util.java index 7b744dfea6..e593858f8b 100644 --- a/library/src/main/java/com/google/android/exoplayer/mp4/Mp4Util.java +++ b/library/src/main/java/com/google/android/exoplayer/mp4/Mp4Util.java @@ -161,7 +161,7 @@ public final class Mp4Util { } } - int limit = endOffset - 2; + int limit = endOffset - 1; // We're looking for the NAL unit start code prefix 0x000001, followed by a byte that matches // the specified type. The value of i tracks the index of the third byte in the four bytes // being examined.