Skip to content

Commit

Permalink
Respect decode-only flag in MetadataRenderer
Browse files Browse the repository at this point in the history
Issue #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144999973
  • Loading branch information
ojw28 committed Jan 20, 2017
1 parent 9617986 commit 7abc34c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ public void render(long positionUs, long elapsedRealtimeUs) throws ExoPlaybackEx
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;
Expand Down

0 comments on commit 7abc34c

Please sign in to comment.