sannies / mp4parser

A Java API to read, write and create MP4 files
Apache License 2.0
2.76k stars 567 forks source link

Understand IndexOutOfBoundsException #423

Open divanshArora opened 4 years ago

divanshArora commented 4 years ago

Hi Sebastian I am using this code in my application and getting IndexOutOfBoundsException in the asByteBuffer method. I see this being thrown. Could you please tell me how it is supposed to be handled (if it is) as I'm seeing an exception being thrown explicitly below:

https://github.com/sannies/mp4parser/blob/d3c68436f0507a23a740f262cf3259557ea9ce93/muxer/src/main/java/org/mp4parser/muxer/container/mp4/DefaultMp4SampleList.java#L233

I have looked at other issues as well regarding the index out of bound error but none seem to solve my issue.