Skip to content

Commit

Permalink
Prevent bounds exception in video sample handling
Browse files Browse the repository at this point in the history
Contributes to #561
  • Loading branch information
drewnoakes committed Apr 3, 2022
1 parent 65934b6 commit b30691e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ VideoSampleDescription getSampleDescription(SequentialReader reader) throws IOEx

public void addMetadata(QuickTimeVideoDirectory directory)
{
if (sampleDescriptions.size() == 0) {
return;
}

VideoSampleDescription sampleDescription = sampleDescriptions.get(0);

QuickTimeDictionary.setLookup(QuickTimeVideoDirectory.TAG_VENDOR, sampleDescription.vendor, directory);
Expand Down

0 comments on commit b30691e

Please sign in to comment.