MCPcopy Create free account
hub / github.com/AOMediaCodec/libavif / avifTrackReferenceBox

Function avifTrackReferenceBox

src/read.c:3849–3872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3847}
3848
3849static avifBool avifTrackReferenceBox(avifTrack * track, const uint8_t * raw, size_t rawLen, avifDiagnostics * diag)
3850{
3851 BEGIN_STREAM(s, raw, rawLen, diag, "Box[tref]");
3852
3853 while (avifROStreamHasBytesLeft(&s, 1)) {
3854 avifBoxHeader header;
3855 AVIF_CHECK(avifROStreamReadBoxHeader(&s, &header));
3856
3857 if (!memcmp(header.type, "auxl", 4)) {
3858 uint32_t toID;
3859 AVIF_CHECK(avifROStreamReadU32(&s, &toID)); // unsigned int(32) track_IDs[];
3860 AVIF_CHECK(avifROStreamSkip(&s, header.size - sizeof(uint32_t))); // just take the first one
3861 track->auxForID = toID;
3862 } else if (!memcmp(header.type, "prem", 4)) {
3863 uint32_t byID;
3864 AVIF_CHECK(avifROStreamReadU32(&s, &byID)); // unsigned int(32) track_IDs[];
3865 AVIF_CHECK(avifROStreamSkip(&s, header.size - sizeof(uint32_t))); // just take the first one
3866 track->premByID = byID;
3867 } else {
3868 AVIF_CHECK(avifROStreamSkip(&s, header.size));
3869 }
3870 }
3871 return AVIF_TRUE;
3872}
3873
3874static avifBool avifParseEditListBox(avifTrack * track, const uint8_t * raw, size_t rawLen, avifDiagnostics * diag)
3875{

Callers 1

avifParseTrackBoxFunction · 0.85

Calls 4

avifROStreamHasBytesLeftFunction · 0.85
avifROStreamReadU32Function · 0.85
avifROStreamSkipFunction · 0.85

Tested by

no test coverage detected