mirror of
https://github.com/samsonjs/media.git
synced 2026-04-11 12:15:47 +00:00
Set tile count in Pngextractor
Tile count must be set to make sure the image decoder recognises and supports the format. PiperOrigin-RevId: 555136616
This commit is contained in:
parent
38eabdc9fc
commit
7bc213d3ef
1 changed files with 6 additions and 1 deletions
|
|
@ -108,7 +108,12 @@ public final class PngExtractor implements Extractor {
|
|||
private void outputImageTrackAndSeekMap() {
|
||||
ExtractorOutput extractorOutput = checkNotNull(this.extractorOutput);
|
||||
TrackOutput imageTrackOutput = extractorOutput.track(IMAGE_TRACK_ID, C.TRACK_TYPE_IMAGE);
|
||||
imageTrackOutput.format(new Format.Builder().setContainerMimeType(MimeTypes.IMAGE_PNG).build());
|
||||
imageTrackOutput.format(
|
||||
new Format.Builder()
|
||||
.setContainerMimeType(MimeTypes.IMAGE_PNG)
|
||||
.setTileCountHorizontal(1)
|
||||
.setTileCountVertical(1)
|
||||
.build());
|
||||
extractorOutput.endTracks();
|
||||
extractorOutput.seekMap(new SingleSampleSeekMap(/* durationUs= */ C.TIME_UNSET));
|
||||
state = STATE_READING_IMAGE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue