mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Fix SmoothStreaming
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=129851843
This commit is contained in:
parent
23981a6fc4
commit
2a15480102
2 changed files with 2 additions and 14 deletions
|
|
@ -59,18 +59,6 @@ public final class ChunkExtractorWrapper implements ExtractorOutput, TrackOutput
|
|||
// Accessed only on the loader thread.
|
||||
private boolean seenTrack;
|
||||
|
||||
/**
|
||||
* @param extractor The extractor to wrap.
|
||||
* @param manifestFormat A manifest defined {@link Format} whose data should be merged into any
|
||||
* sample {@link Format} output from the {@link Extractor}.
|
||||
* @param preferManifestDrmInitData Whether {@link DrmInitData} defined in {@code manifestFormat}
|
||||
* should be preferred when the sample and manifest {@link Format}s are merged.
|
||||
*/
|
||||
public ChunkExtractorWrapper(Extractor extractor, Format manifestFormat,
|
||||
boolean preferManifestDrmInitData) {
|
||||
this(extractor, manifestFormat, preferManifestDrmInitData, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param extractor The extractor to wrap.
|
||||
* @param manifestFormat A manifest defined {@link Format} whose data should be merged into any
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ public class DefaultSsChunkSource implements SsChunkSource {
|
|||
extractorWrappers = new ChunkExtractorWrapper[trackSelection.length()];
|
||||
for (int i = 0; i < extractorWrappers.length; i++) {
|
||||
int manifestTrackIndex = trackSelection.getIndexInTrackGroup(i);
|
||||
Format format = streamElement.formats[i];
|
||||
Format format = streamElement.formats[manifestTrackIndex];
|
||||
int nalUnitLengthFieldLength = streamElement.type == C.TRACK_TYPE_VIDEO ? 4 : -1;
|
||||
Track track = new Track(manifestTrackIndex, streamElement.type, streamElement.timescale,
|
||||
C.UNSET_TIME_US, manifest.durationUs, format, Track.TRANSFORMATION_NONE,
|
||||
|
|
@ -102,7 +102,7 @@ public class DefaultSsChunkSource implements SsChunkSource {
|
|||
FragmentedMp4Extractor extractor = new FragmentedMp4Extractor(
|
||||
FragmentedMp4Extractor.FLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME
|
||||
| FragmentedMp4Extractor.FLAG_WORKAROUND_IGNORE_TFDT_BOX, track);
|
||||
extractorWrappers[i] = new ChunkExtractorWrapper(extractor, format, false);
|
||||
extractorWrappers[i] = new ChunkExtractorWrapper(extractor, format, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue