Commit a727acd2 by olly Committed by Toni

Remove nullness test blacklist for RTMP extension

PiperOrigin-RevId: 249274122
parent 37fc1d87
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
*/ */
package com.google.android.exoplayer2.ext.rtmp; package com.google.android.exoplayer2.ext.rtmp;
import static com.google.android.exoplayer2.util.Util.castNonNull;
import android.net.Uri; import android.net.Uri;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
...@@ -34,8 +36,8 @@ public final class RtmpDataSource extends BaseDataSource { ...@@ -34,8 +36,8 @@ public final class RtmpDataSource extends BaseDataSource {
ExoPlayerLibraryInfo.registerModule("goog.exo.rtmp"); ExoPlayerLibraryInfo.registerModule("goog.exo.rtmp");
} }
private RtmpClient rtmpClient; @Nullable private RtmpClient rtmpClient;
private Uri uri; @Nullable private Uri uri;
public RtmpDataSource() { public RtmpDataSource() {
super(/* isNetwork= */ true); super(/* isNetwork= */ true);
...@@ -66,7 +68,7 @@ public final class RtmpDataSource extends BaseDataSource { ...@@ -66,7 +68,7 @@ public final class RtmpDataSource extends BaseDataSource {
@Override @Override
public int read(byte[] buffer, int offset, int readLength) throws IOException { public int read(byte[] buffer, int offset, int readLength) throws IOException {
int bytesRead = rtmpClient.read(buffer, offset, readLength); int bytesRead = castNonNull(rtmpClient).read(buffer, offset, readLength);
if (bytesRead == -1) { if (bytesRead == -1) {
return C.RESULT_END_OF_INPUT; return C.RESULT_END_OF_INPUT;
} }
...@@ -87,6 +89,7 @@ public final class RtmpDataSource extends BaseDataSource { ...@@ -87,6 +89,7 @@ public final class RtmpDataSource extends BaseDataSource {
} }
@Override @Override
@Nullable
public Uri getUri() { public Uri getUri() {
return uri; return uri;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment