Skip to content

Sniffer.sniffFragmented() fails on MP4 files with uuid atom between ftyp and moov #3046

@brAzzi64

Description

@brAzzi64

Version

Media3 1.8.0

More version details

No response

Devices that reproduce the issue

Pixel 8 Pro, Android 16.0

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. Obtain an MP4 file with a uuid atom positioned between ftyp and moov (e.g., a video with C2PA Content Credentials metadata)
  2. Play the file using ProgressiveMediaSource with default extractors
  3. Observe playback failure

Expected result

Video plays successfully. The uuid atom is a valid extension per ISO 14496-12 and should be skipped by the sniffer.

Actual result

Sniffer fails to identify the file as fragmented MP4. ExoPlayer reports 0 tracks and throws:

ParserException: Loading finished before preparation is complete. {contentIsMalformed=true, dataType=1}

The file structure is:
ftyp @ 0, size=36
uuid @ 36, size=16776 <-- C2PA manifest (valid per ISO 14496-12)
moov @ 16812, size=1213
moof @ 18025, size=4708
mdat @ 22733, size=469611

Note: FragmentedMp4Extractor CAN parse this file correctly when forced directly (bypassing sniffing). The bug is only in the sniffing phase.

Media

Will email sample video to android-media-github@google.com.

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