Open ashraf-revo opened 4 years ago
iam getting an NullPointerException when reading my h264 file using H264AnnexBTrack
public static void main(String[] args) throws Exception { String file = "video.h264"; H264AnnexBTrack h264 = new H264AnnexBTrack(new FileInputStream(file)); AtomicInteger atomicInteger = new AtomicInteger(); h264.setSampleSink(new SampleSink() { @Override public void close() { } @Override public void acceptSample(StreamingSample streamingSample, StreamingTrack streamingTrack) { System.out.println(atomicInteger.incrementAndGet()); } }); h264.call(); }
this breakpoints show what is the problem
public static void main(String[] args) throws IOException { String file = "video.h264"; H264TrackImpl h264Track = new H264TrackImpl(new FileDataSourceImpl(file)); System.out.println(h264Track.getSamples().size()); }
iam getting an NullPointerException when reading my h264 file using H264AnnexBTrack
this breakpoints show what is the problem
How ever i tried using another interface H264TrackImpl for reading the file and it works for me