diff --git a/library/core/src/androidTest/assets/ts/sample.ps.0.dump b/library/core/src/androidTest/assets/ts/sample.ps.0.dump index 3b44fb6fb9..98f3c6a85a 100644 --- a/library/core/src/androidTest/assets/ts/sample.ps.0.dump +++ b/library/core/src/androidTest/assets/ts/sample.ps.0.dump @@ -69,7 +69,7 @@ track 224: sample 0: time = 40000 flags = 1 - data = length 20616, hash CA38A5B5 + data = length 20646, hash 576390B sample 1: time = 80000 flags = 0 diff --git a/library/core/src/androidTest/assets/ts/sample.ts.0.dump b/library/core/src/androidTest/assets/ts/sample.ts.0.dump index 26c6665aaa..83f1337816 100644 --- a/library/core/src/androidTest/assets/ts/sample.ts.0.dump +++ b/library/core/src/androidTest/assets/ts/sample.ts.0.dump @@ -28,9 +28,9 @@ track 256: data = length 22, hash CE183139 sample count = 2 sample 0: - time = 33366 + time = 0 flags = 1 - data = length 20669, hash 26DABA0F + data = length 20711, hash 34341E8 sample 1: time = 66733 flags = 0 diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java index add8079105..a00bace56c 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java @@ -137,9 +137,10 @@ public final class H262Reader implements ElementaryStreamReader { } } - if (hasOutputFormat && (startCodeValue == START_PICTURE || startCodeValue == START_SEQUENCE_HEADER)) { + if (hasOutputFormat + && (startCodeValue == START_PICTURE || startCodeValue == START_SEQUENCE_HEADER)) { int bytesWrittenPastStartCode = limit - startCodeOffset; - boolean resetSample = (samplePosition == C.POSITION_UNSET); + boolean resetSample = samplePosition == C.POSITION_UNSET; if (foundPicture) { @C.BufferFlags int flags = isKeyframe ? C.BUFFER_FLAG_KEY_FRAME : 0; int size = (int) (totalBytesWritten - samplePosition) - bytesWrittenPastStartCode; @@ -147,7 +148,7 @@ public final class H262Reader implements ElementaryStreamReader { isKeyframe = false; resetSample = true; } - foundPicture = (startCodeValue == START_PICTURE); + foundPicture = startCodeValue == START_PICTURE; if (resetSample) { samplePosition = totalBytesWritten - bytesWrittenPastStartCode; sampleTimeUs = (pesPtsUsAvailable ? pesTimeUs : sampleTimeUs + frameDurationUs); diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java index 1c39b558bb..2bba9071fd 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java @@ -126,7 +126,8 @@ import java.util.List; *
  • Default: {@code R.id.exo_playback_control_view}
  • * *
  • All attributes that can be set on a {@link PlaybackControlView} can also be set on a - * SimpleExoPlayerView, and will be propagated to the inflated {@link PlaybackControlView}. + * SimpleExoPlayerView, and will be propagated to the inflated {@link PlaybackControlView} + * unless the layout is overridden to specify a custom {@code exo_controller} (see below). *
  • * * @@ -163,18 +164,17 @@ import java.util.List; * * *
  • {@code exo_controller_placeholder} - A placeholder that's replaced with the inflated - * {@link PlaybackControlView}. + * {@link PlaybackControlView}. Ignored if an {@code exo_controller} view exists. * *
  • - *
  • {@code exo_controller} - An already inflated instance of - * {@link PlaybackControlView}. Allows you to use your own {@link PlaybackControlView} instead - * of default. Note: attrs such as rewind_increment will not be passed through to this - * instance and should be set at creation. {@code exo_controller_placeholder} will be ignored - * if this is set. + *
  • {@code exo_controller} - An already inflated {@link PlaybackControlView}. Allows use + * of a custom extension of {@link PlaybackControlView}. Note that attributes such as + * {@code rewind_increment} will not be automatically propagated through to this instance. If + * a view exists with this id, any {@code exo_controller_placeholder} view will be ignored. * *
  • *
  • {@code exo_overlay} - A {@link FrameLayout} positioned on top of the player which