Netflix / photon

Photon is a Java implementation of the Interoperable Master Format (IMF) standard. IMF is a SMPTE standard whose core constraints are defined in the specification st2067-2:2013
Apache License 2.0
234 stars 77 forks source link

IMF MXF audio file crashes com.netflix.imflibrary.app.IMFTrackFileReader #174

Closed go4shoe closed 7 years ago

go4shoe commented 7 years ago

Invoking:

java -cp build\libs*; com.netflix.imflibrary.app.IMFTrackFileReader "y:\REMUXED\CPL_REMUXED_f1adddb3-da84-1549-be8a-5b6ae2f50208.mxf" "Y:\REMUXED"

results in:

Exception in thread "main" java.lang.NullPointerException at com.netflix.imflibrary.IMFConstraints.lambda$checkIMFCompliance$0(IMFConstraints.java:195) at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.util.stream.ReferencePipeline.collect(Unknown Source) at com.netflix.imflibrary.IMFConstraints.checkIMFCompliance(IMFConstraints.java:195) at com.netflix.imflibrary.app.IMFTrackFileReader.setHeaderPartitionIMF(IMFTrackFileReader.java:126) at com.netflix.imflibrary.app.IMFTrackFileReader.getHeaderPartitionIMF(IMFTrackFileReader.java:96) at com.netflix.imflibrary.app.IMFTrackFileReader.getHeaderPartition(IMFTrackFileReader.java:109) at com.netflix.imflibrary.app.IMFTrackFileReader.getPrimerPackHeader(IMFTrackFileReader.java:524) at com.netflix.imflibrary.app.IMFTrackFileCPLBuilder.(IMFTrackFileCPLBuilder.java:101) at com.netflix.imflibrary.app.IMFTrackFileReader.main(IMFTrackFileReader.java:696)

Crash at:

com\netflix\imflibrary\IMFConstraints.java(195)

List soundFieldGroupLabelSubDescriptors = subDescriptors.subList(0, subDescriptors.size()).stream().filter(interchangeObjectBO -> interchangeObjectBO.getClass().getEnclosingClass().equals(SoundFieldGroupLabelSubDescriptor.class)).collect(Collectors.toList());

Sample file at:

https://drive.google.com/open?id=0B1K1m-YmE28DNmRiSDhBdEd5Mzg

go4shoe commented 7 years ago

The first array entry of subDescriptors is null but should be filled with: GroupOfSoundfieldGroupsSubDescriptor (SMPTE ST377-4:2012) Key: {06, 0E, 2B, 34, 02, 53, 01, 01, 0D, 01, 01, 01, 01, 01, 6D, 00}

I think you have not implemented GroupOfSoundfieldGroupsSubDescriptor

svenkatrav commented 7 years ago

Thanks for identifying the issue. Photon release 4.3.3 has fix for this.