Commit b2222f8c by vitekn Committed by GitHub

Null pointer exception fixed

pesPayloadReader can be null here because DefaultStreamReader.init() can return null on unknown streamId. If we have a junk transport stream in our content an exception will be thrown.
parent 924a0417
......@@ -467,8 +467,10 @@ public final class TsExtractor implements Extractor {
pesPayloadReader = id3Reader;
} else {
pesPayloadReader = streamReaderFactory.createStreamReader(streamType, esInfo);
if (pesPayloadReader != null) {
pesPayloadReader.init(output, new TrackIdGenerator(trackId, MAX_PID_PLUS_ONE));
}
}
if (pesPayloadReader != null) {
tsPayloadReaders.put(elementaryPid, new PesReader(pesPayloadReader, timestampAdjuster));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment