Commit ffb4aeaa by olly Committed by Oliver Woodman

Remove pointless constructor argument.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=120123223
parent 17d7a0cb
...@@ -56,16 +56,12 @@ public class ContainerMediaChunk extends BaseMediaChunk implements SingleTrackMe ...@@ -56,16 +56,12 @@ public class ContainerMediaChunk extends BaseMediaChunk implements SingleTrackMe
* the data is known to define its own sample format. * the data is known to define its own sample format.
* @param drmInitData The {@link DrmInitData} for the chunk. Null if the media is not drm * @param drmInitData The {@link DrmInitData} for the chunk. Null if the media is not drm
* protected. May also be null if the data is known to define its own initialization data. * protected. May also be null if the data is known to define its own initialization data.
* @param isSampleFormatFinal True if {@code sampleFormat} and {@code drmInitData} are known to be
* correct and final. False if the data may define its own sample format or initialization
* data.
*/ */
public ContainerMediaChunk(DataSource dataSource, DataSpec dataSpec, int trigger, Format format, public ContainerMediaChunk(DataSource dataSource, DataSpec dataSpec, int trigger, Format format,
long startTimeUs, long endTimeUs, int chunkIndex, long sampleOffsetUs, long startTimeUs, long endTimeUs, int chunkIndex, long sampleOffsetUs,
ChunkExtractorWrapper extractorWrapper, Format sampleFormat, DrmInitData drmInitData, ChunkExtractorWrapper extractorWrapper, Format sampleFormat, DrmInitData drmInitData) {
boolean isSampleFormatFinal) {
super(dataSource, dataSpec, trigger, format, startTimeUs, endTimeUs, chunkIndex, super(dataSource, dataSpec, trigger, format, startTimeUs, endTimeUs, chunkIndex,
isSampleFormatFinal); sampleFormat != null);
this.extractorWrapper = extractorWrapper; this.extractorWrapper = extractorWrapper;
this.sampleOffsetUs = sampleOffsetUs; this.sampleOffsetUs = sampleOffsetUs;
this.sampleFormat = getAdjustedSampleFormat(sampleFormat, sampleOffsetUs); this.sampleFormat = getAdjustedSampleFormat(sampleFormat, sampleOffsetUs);
......
...@@ -405,11 +405,10 @@ public class DashChunkSource implements ChunkSource { ...@@ -405,11 +405,10 @@ public class DashChunkSource implements ChunkSource {
return new SingleSampleMediaChunk(dataSource, dataSpec, Chunk.TRIGGER_INITIAL, trackFormat, return new SingleSampleMediaChunk(dataSource, dataSpec, Chunk.TRIGGER_INITIAL, trackFormat,
startTimeUs, endTimeUs, segmentNum, trackFormat, null); startTimeUs, endTimeUs, segmentNum, trackFormat, null);
} else { } else {
boolean isSampleFormatFinal = sampleFormat != null;
long sampleOffsetUs = -representation.presentationTimeOffsetUs; long sampleOffsetUs = -representation.presentationTimeOffsetUs;
return new ContainerMediaChunk(dataSource, dataSpec, trigger, trackFormat, startTimeUs, return new ContainerMediaChunk(dataSource, dataSpec, trigger, trackFormat, startTimeUs,
endTimeUs, segmentNum, sampleOffsetUs, representationHolder.extractorWrapper, endTimeUs, segmentNum, sampleOffsetUs, representationHolder.extractorWrapper,
sampleFormat, drmInitData, isSampleFormatFinal); sampleFormat, drmInitData);
} }
} }
......
...@@ -360,8 +360,7 @@ public class SmoothStreamingChunkSource implements ChunkSource { ...@@ -360,8 +360,7 @@ public class SmoothStreamingChunkSource implements ChunkSource {
// To convert them the absolute timestamps, we need to set sampleOffsetUs to chunkStartTimeUs. // To convert them the absolute timestamps, we need to set sampleOffsetUs to chunkStartTimeUs.
long sampleOffsetUs = chunkStartTimeUs; long sampleOffsetUs = chunkStartTimeUs;
return new ContainerMediaChunk(dataSource, dataSpec, trigger, format, chunkStartTimeUs, return new ContainerMediaChunk(dataSource, dataSpec, trigger, format, chunkStartTimeUs,
chunkEndTimeUs, chunkIndex, sampleOffsetUs, extractorWrapper, sampleFormat, drmInitData, chunkEndTimeUs, chunkIndex, sampleOffsetUs, extractorWrapper, sampleFormat, drmInitData);
true);
} }
private static byte[] getProtectionElementKeyId(byte[] initData) { private static byte[] getProtectionElementKeyId(byte[] initData) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment