mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Handle metadata failing to decode in MetadataRenderer
Issue: #5149 PiperOrigin-RevId: 223121651
This commit is contained in:
parent
05a79a417a
commit
510749fa15
2 changed files with 8 additions and 3 deletions
|
|
@ -26,6 +26,8 @@
|
||||||
* Do not retry failed loads whose error is `FileNotFoundException`.
|
* Do not retry failed loads whose error is `FileNotFoundException`.
|
||||||
* Fix issue with applying the `show_buffering` attribute in `PlayerView`
|
* Fix issue with applying the `show_buffering` attribute in `PlayerView`
|
||||||
([#5139](https://github.com/google/ExoPlayer/issues/5139)).
|
([#5139](https://github.com/google/ExoPlayer/issues/5139)).
|
||||||
|
* Fix issue where null `Metadata` was output when it failed to decode
|
||||||
|
([#5149](https://github.com/google/ExoPlayer/issues/5149)).
|
||||||
|
|
||||||
### 2.9.1 ###
|
### 2.9.1 ###
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,9 +129,12 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
|
||||||
buffer.subsampleOffsetUs = formatHolder.format.subsampleOffsetUs;
|
buffer.subsampleOffsetUs = formatHolder.format.subsampleOffsetUs;
|
||||||
buffer.flip();
|
buffer.flip();
|
||||||
int index = (pendingMetadataIndex + pendingMetadataCount) % MAX_PENDING_METADATA_COUNT;
|
int index = (pendingMetadataIndex + pendingMetadataCount) % MAX_PENDING_METADATA_COUNT;
|
||||||
pendingMetadata[index] = decoder.decode(buffer);
|
Metadata metadata = decoder.decode(buffer);
|
||||||
pendingMetadataTimestamps[index] = buffer.timeUs;
|
if (metadata != null) {
|
||||||
pendingMetadataCount++;
|
pendingMetadata[index] = metadata;
|
||||||
|
pendingMetadataTimestamps[index] = buffer.timeUs;
|
||||||
|
pendingMetadataCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue