mirror of
https://github.com/samsonjs/media.git
synced 2026-04-10 12:05:47 +00:00
Fix loadDrmInitData given DASH manifest parser changes
DASH manifests can now contain non-null but incomplete DRM init data. Hence using the manifest init data when non-null is not always the correct thing to do. This change merges the sample and manifest formats (which correctly merges the DRM init data) and then uses the result. Issue: #3630 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=180787784
This commit is contained in:
parent
c89cc81b71
commit
a1bac99f3b
1 changed files with 4 additions and 7 deletions
|
|
@ -81,14 +81,11 @@ public final class DashUtil {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
DrmInitData drmInitData = representation.format.drmInitData;
|
||||
if (drmInitData != null) {
|
||||
// Prefer drmInitData obtained from the manifest over drmInitData obtained from the stream,
|
||||
// as per DASH IF Interoperability Recommendations V3.0, 7.5.3.
|
||||
return drmInitData;
|
||||
}
|
||||
Format manifestFormat = representation.format;
|
||||
Format sampleFormat = DashUtil.loadSampleFormat(dataSource, primaryTrackType, representation);
|
||||
return sampleFormat == null ? null : sampleFormat.drmInitData;
|
||||
return sampleFormat == null
|
||||
? manifestFormat.drmInitData
|
||||
: sampleFormat.copyWithManifestFormatInfo(manifestFormat).drmInitData;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue