diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 22c61066d15..553b05e8f02 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -39,6 +39,8 @@
([#5971](https://github.com/google/ExoPlayer/issues/5971)).
* Fix bug in `CastPlayer.getCurrentWindowIndex()`
([#5955](https://github.com/google/ExoPlayer/issues/5955)).
+* Add support for auto-detecting UDP streams in `DefaultDataSource`
+ ([#6036](https://github.com/google/ExoPlayer/pull/6036)).
### 2.10.1 ###
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java b/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java
index 8461b3e1050..69db1cfdb1c 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java
@@ -42,6 +42,7 @@
*
rtmp: For fetching data over RTMP. Only supported if the project using ExoPlayer has an
* explicit dependency on ExoPlayer's RTMP extension.
* data: For parsing data inlined in the URI as defined in RFC 2397.
+ * udp: For fetching data over UDP (e.g. udp://something.com/media).
* http(s): For fetching data over HTTP and HTTPS (e.g. https://www.something.com/media.mp4),
* if constructed using {@link #DefaultDataSource(Context, TransferListener, String,
* boolean)}, or any other schemes supported by a base data source if constructed using {@link
@@ -243,7 +244,7 @@ public long open(DataSpec dataSpec) throws IOException {
dataSource = getContentDataSource();
} else if (SCHEME_RTMP.equals(scheme)) {
dataSource = getRtmpDataSource();
- } else if(SCHEME_UDP.equals(scheme)){
+ } else if (SCHEME_UDP.equals(scheme)) {
dataSource = getUdpDataSource();
} else if (DataSchemeDataSource.SCHEME_DATA.equals(scheme)) {
dataSource = getDataSchemeDataSource();
@@ -282,7 +283,7 @@ public void close() throws IOException {
}
}
- private DataSource getUdpDataSource(){
+ private DataSource getUdpDataSource() {
if (udpDataSource == null) {
udpDataSource = new UdpDataSource();
addListenersToDataSource(udpDataSource);