From 5c8e1bd6d4828842f160bd66eb6c8c6aabb92f47 Mon Sep 17 00:00:00 2001 From: emrah88 Date: Mon, 15 Jan 2018 16:15:25 +0100 Subject: [PATCH] ensuring datasource is build with headers --- .../src/main/java/com/brentvatne/exoplayer/DataSourceUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/DataSourceUtil.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/DataSourceUtil.java index 2c3af708..91bee912 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/DataSourceUtil.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/DataSourceUtil.java @@ -49,7 +49,7 @@ public class DataSourceUtil { } public static DataSource.Factory getDefaultDataSourceFactory(Context context, DefaultBandwidthMeter bandwidthMeter, Map requestHeaders) { - if (defaultDataSourceFactory == null) { + if (defaultDataSourceFactory == null || !requestHeaders.isEmpty()) { defaultDataSourceFactory = buildDataSourceFactory(context, bandwidthMeter, requestHeaders); } return defaultDataSourceFactory;