mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Clear buffer in fake renderer in each iteration.
This simulates reading from the buffer (which is what actual renderers would do). Otherwise the buffer always gets expanded and might cause memory issues. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=167994899
This commit is contained in:
parent
b2627d63fd
commit
8f43dcd424
1 changed files with 1 additions and 0 deletions
|
|
@ -59,6 +59,7 @@ public class FakeRenderer extends BaseRenderer {
|
|||
@Override
|
||||
public void render(long positionUs, long elapsedRealtimeUs) throws ExoPlaybackException {
|
||||
if (!isEnded) {
|
||||
buffer.clear();
|
||||
// Verify the format matches the expected format.
|
||||
FormatHolder formatHolder = new FormatHolder();
|
||||
int result = readSource(formatHolder, buffer, false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue