google / google/ExoPlayer

Reduce memory consumption of decoder extension input/output buffers

Open
#3,120 4 comments 0 reactions 1 assignee Assigned to @rohitjoins View on GitHub
enhancement
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

I find that `LibvpxVideoRenderer` has hold 16 inputbuffer and 16 outputbuffer. All these buffer are allocated in java layout. For example , a 720p video:
**InputBuffer:** 16\*INITIAL_INPUT_BUFFER_SIZE = 16\*768 \* 1024=12M
**Outputbuffer:**: 16\*1280\*720\*3/2 = 21M
Allocate 33M memory in java layout is very easy to oom. I suggest that:
1. reduce the buffer size to 4
2. allocate and free the buffer in native(C) layout

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.