mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Respect decode-only flag in MetadataRenderer
Issue #2176 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=144999973
This commit is contained in:
parent
9617986538
commit
7abc34c6ae
1 changed files with 4 additions and 0 deletions
|
|
@ -113,6 +113,10 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
|
||||||
if (result == C.RESULT_BUFFER_READ) {
|
if (result == C.RESULT_BUFFER_READ) {
|
||||||
if (buffer.isEndOfStream()) {
|
if (buffer.isEndOfStream()) {
|
||||||
inputStreamEnded = true;
|
inputStreamEnded = true;
|
||||||
|
} else if (buffer.isDecodeOnly()) {
|
||||||
|
// Do nothing. Note this assumes that all metadata buffers can be decoded independently.
|
||||||
|
// If we ever need to support a metadata format where this is not the case, we'll need to
|
||||||
|
// pass the buffer to the decoder and discard the output.
|
||||||
} else {
|
} else {
|
||||||
pendingMetadataTimestamp = buffer.timeUs;
|
pendingMetadataTimestamp = buffer.timeUs;
|
||||||
buffer.subsampleOffsetUs = formatHolder.format.subsampleOffsetUs;
|
buffer.subsampleOffsetUs = formatHolder.format.subsampleOffsetUs;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue