sannies / mp4parser

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

NullPointerException when create aactrack #276

Closed elivish closed 6 years ago

elivish commented 7 years ago

when I try to create serveral AACtrack from file,I use code like below: for(DubbingBlock block : blocks) { AACTrackImpl audioImpl = new AACTrackImpl(new FileDataSourceImpl(block.aacOutputFilePath)); audioTracks.add(audioImpl); } but sometime it throw this exception: java.lang.NullPointerException: at com.googlecode.mp4parser.authoring.tracks.AACTrackImpl. (AACTrackImpl.java:144) at com.googlecode.mp4parser.authoring.tracks.AACTrackImpl. (AACTrackImpl.java:135) at com.googlecode.mp4parser.authoring.tracks.AACTrackImpl. (AACTrackImpl.java:135)

I'm check these aacFile exist and its adts header correct.so what is this problem?And in what situation the lib will throw the upper exception. please check this. thanks!