diff options
author | Live Channels Team <no-reply@google.com> | 2019-01-17 09:00:11 -0800 |
---|---|---|
committer | Nick Chalko <nchalko@google.com> | 2019-02-12 22:14:07 -0800 |
commit | 169da9c0e7cfe841d20a7e98b10482701fba05e8 (patch) | |
tree | 332fe2689208e8ad83366c8f2d3a85f0920a7fe9 | |
parent | d55e20c8cdad6b479fa6a9e32e1a18707104685c (diff) | |
download | android_packages_apps_TV-169da9c0e7cfe841d20a7e98b10482701fba05e8.tar.gz android_packages_apps_TV-169da9c0e7cfe841d20a7e98b10482701fba05e8.tar.bz2 android_packages_apps_TV-169da9c0e7cfe841d20a7e98b10482701fba05e8.zip |
Add start position to MediaSource.createPeriod.
That's the same position set in MediaPeriod.prepare (where it may be removed
in the future).
Having the position at an earlier point is necessary to fix an
issue with lazy preparation in ConcatenatingMediaSource where the prepare
position was assumed to be known but MediaPeriod.prepare hasn't been called
yet.
Issue:#5350
PiperOrigin-RevId: 229756637
Change-Id: I69fa68ad9debb46a9f2bee22ef54079784da5fdd
-rw-r--r-- | tuner/src/com/android/tv/tuner/exoplayer/ExoPlayerSampleExtractor.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tuner/src/com/android/tv/tuner/exoplayer/ExoPlayerSampleExtractor.java b/tuner/src/com/android/tv/tuner/exoplayer/ExoPlayerSampleExtractor.java index b0049452..72165b71 100644 --- a/tuner/src/com/android/tv/tuner/exoplayer/ExoPlayerSampleExtractor.java +++ b/tuner/src/com/android/tv/tuner/exoplayer/ExoPlayerSampleExtractor.java @@ -365,7 +365,8 @@ public class ExoPlayerSampleExtractor implements SampleExtractor { mMediaPeriod = mSampleSource.createPeriod( new MediaSource.MediaPeriodId(0), - new DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE)); + new DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE), + 0); mMediaPeriod.prepare(this, 0); try { mMediaPeriod.maybeThrowPrepareError(); |