[AVOD] Added if empty checks for streamKeys.

DashMediaSource is created with Manifest data and streamKeys can be empty given that streamKeys are only created out of MediaItem inside DashMediaSource, and this particular implementation don't extract them out of MediaItem properties.

Tested=Verified playback works.
PiperOrigin-RevId: 298550021
This commit is contained in:
olly 2020-03-03 09:17:08 +00:00 committed by Oliver Woodman
parent aeea17dd0f
commit f248a10627

View File

@ -258,7 +258,7 @@ public final class DashMediaSource extends BaseMediaSource {
*/
public DashMediaSource createMediaSource(DashManifest manifest) {
Assertions.checkArgument(!manifest.dynamic);
if (streamKeys != null) {
if (streamKeys != null && !streamKeys.isEmpty()) {
manifest = manifest.copy(streamKeys);
}
return new DashMediaSource(