mirror of
https://github.com/samsonjs/media.git
synced 2026-04-15 12:55:46 +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,
|
||||
Representation... representations) {
|
||||
long periodDurationUs = (representations[0].periodDurationMs == -1)
|
||||
? -1 : representations[0].periodDurationMs * 1000;
|
||||
|
||||
this.dataSource = dataSource;
|
||||
this.evaluator = evaluator;
|
||||
this.formats = new Format[representations.length];
|
||||
this.extractors = new HashMap<String, Extractor>();
|
||||
this.segmentIndexes = new HashMap<String, DashSegmentIndex>();
|
||||
this.representations = new HashMap<String, Representation>();
|
||||
this.trackInfo = new TrackInfo(representations[0].format.mimeType,
|
||||
representations[0].periodDurationMs * 1000);
|
||||
this.trackInfo = new TrackInfo(representations[0].format.mimeType, periodDurationUs);
|
||||
this.evaluation = new Evaluation();
|
||||
int maxWidth = 0;
|
||||
int maxHeight = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue