Clip seek position to the inputLength - 1.

This commit is contained in:
Oliver Woodman 2015-05-08 17:08:59 +01:00
parent d9071710cf
commit 9f77c4009e

View File

@ -137,7 +137,7 @@ import com.google.android.exoplayer.util.Util;
} }
long position = (long) ((1f / 256) * fx * sizeBytes) + firstFramePosition; long position = (long) ((1f / 256) * fx * sizeBytes) + firstFramePosition;
return inputLength != C.LENGTH_UNBOUNDED ? Math.min(position, inputLength) : position; return inputLength != C.LENGTH_UNBOUNDED ? Math.min(position, inputLength - 1) : position;
} }
@Override @Override