media3/libraries
rohks 9bc89ae989 Ensure track indices are only added when samples are committed
Previously, track IDs were added to `trackIndicesPerSampleInQueuedOrder`
even when the sample was not committed. This caused issues where attempts
to read samples from the `SampleQueue` returned `C.RESULT_READ_NOTHING`,
which led to an exception being thrown due to the assumption that samples
were available to read.

This fix updates the logic to track sample commits by comparing the write index before and after calling `SampleQueue.sampleMetadata`. Track indices are only added if the sample was committed, ensuring accurate sample handling and avoiding exceptions.

PiperOrigin-RevId: 675526115
2024-09-17 05:27:51 -07:00
..
2024-09-17 05:25:07 -07:00
2024-08-07 12:28:25 -07:00
2024-07-24 16:17:00 +01:00
2024-07-24 16:17:00 +01:00
2024-07-24 16:17:00 +01:00
2024-08-07 12:28:25 -07:00
2024-07-24 16:17:00 +01:00
2024-09-17 05:25:07 -07:00
2024-09-17 05:25:07 -07:00