Commit 7abc34c6 by olly Committed by Oliver Woodman

Respect decode-only flag in MetadataRenderer

Issue #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144999973
parent 96179865
......@@ -113,6 +113,10 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
if (result == C.RESULT_BUFFER_READ) {
if (buffer.isEndOfStream()) {
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 {
pendingMetadataTimestamp = buffer.timeUs;
buffer.subsampleOffsetUs = formatHolder.format.subsampleOffsetUs;
......
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