mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fixed issue in which setting a representation duration to unknown wasn't handled correctly.
This commit is contained in:
parent
dc644ae86d
commit
2e1f9897e7
1 changed files with 4 additions and 2 deletions
|
|
@ -72,14 +72,16 @@ public class DashChunkSource implements ChunkSource {
|
||||||
*/
|
*/
|
||||||
public DashChunkSource(DataSource dataSource, FormatEvaluator evaluator,
|
public DashChunkSource(DataSource dataSource, FormatEvaluator evaluator,
|
||||||
Representation... representations) {
|
Representation... representations) {
|
||||||
|
long periodDurationUs = (representations[0].periodDurationMs == -1)
|
||||||
|
? -1 : representations[0].periodDurationMs * 1000;
|
||||||
|
|
||||||
this.dataSource = dataSource;
|
this.dataSource = dataSource;
|
||||||
this.evaluator = evaluator;
|
this.evaluator = evaluator;
|
||||||
this.formats = new Format[representations.length];
|
this.formats = new Format[representations.length];
|
||||||
this.extractors = new HashMap<String, Extractor>();
|
this.extractors = new HashMap<String, Extractor>();
|
||||||
this.segmentIndexes = new HashMap<String, DashSegmentIndex>();
|
this.segmentIndexes = new HashMap<String, DashSegmentIndex>();
|
||||||
this.representations = new HashMap<String, Representation>();
|
this.representations = new HashMap<String, Representation>();
|
||||||
this.trackInfo = new TrackInfo(representations[0].format.mimeType,
|
this.trackInfo = new TrackInfo(representations[0].format.mimeType, periodDurationUs);
|
||||||
representations[0].periodDurationMs * 1000);
|
|
||||||
this.evaluation = new Evaluation();
|
this.evaluation = new Evaluation();
|
||||||
int maxWidth = 0;
|
int maxWidth = 0;
|
||||||
int maxHeight = 0;
|
int maxHeight = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue