Skip to content

MetadataRetriever#retrieveDurationUs leads to OOM #2650

@PaulWoitaschek

Description

@PaulWoitaschek

Version

Media3 pre-release (alpha, beta or RC not in this list)

More version details

1.8.0-rc01

Devices that reproduce the issue

Pixel

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

Call retrieveDurationUs twice in parallel on two MetadataRetriever instances like described in #2640 (comment)

It throws an OOM exception. In #2640 I was asked to create another bug about the OOM and it was mentioned that the media3 has likely a very memory heavy representation of the media.

#2640 (comment)

It looks like we are trying to read the whole stbl box, which is 50MB in the MP4 file according to mp4Box (and may be larger in media3's in-memory representation)

The whole issue originated here where users report that they can't see audiobooks of large app size:
PaulWoitaschek/Voice#2896

Expected result

It parses the duration

Actual result

It throws an OOM error

Media

See #2640

Bug Report

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions