Skip to content

Commit

Permalink
read.c: Return avifResult from avifParseSampleTableBox
Browse files Browse the repository at this point in the history
One of the error paths is currently returning `AVIF_FALSE` whereas
the function is supposed to return `avifResult`.

This is important because we may allow parsing of erroneous files.
  • Loading branch information
vigneshvg committed Jun 3, 2024
1 parent 1481683 commit e0e1916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -3274,7 +3274,7 @@ static avifResult avifParseSampleTableBox(avifTrack * track, uint64_t rawOffset,
if (track->sampleTable) {
// A TrackBox may only have one SampleTable
avifDiagnosticsPrintf(diag, "Duplicate Box[stbl] for a single track detected");
return AVIF_FALSE;
return AVIF_RESULT_BMFF_PARSE_FAILED;
}
track->sampleTable = avifSampleTableCreate();
AVIF_CHECKERR(track->sampleTable != NULL, AVIF_RESULT_OUT_OF_MEMORY);
Expand Down

0 comments on commit e0e1916

Please sign in to comment.