Commit e4bafd96 by Santiago Seifert Committed by GitHub

Merge pull request #1979 from vitekn/dev-v2

Fix NPE in TsExtractor when ElementaryStreamReaderFactory returns null
parents 924a0417 b2222f8c
...@@ -467,8 +467,10 @@ public final class TsExtractor implements Extractor { ...@@ -467,8 +467,10 @@ public final class TsExtractor implements Extractor {
pesPayloadReader = id3Reader; pesPayloadReader = id3Reader;
} else { } else {
pesPayloadReader = streamReaderFactory.createStreamReader(streamType, esInfo); pesPayloadReader = streamReaderFactory.createStreamReader(streamType, esInfo);
if (pesPayloadReader != null) {
pesPayloadReader.init(output, new TrackIdGenerator(trackId, MAX_PID_PLUS_ONE)); pesPayloadReader.init(output, new TrackIdGenerator(trackId, MAX_PID_PLUS_ONE));
} }
}
if (pesPayloadReader != null) { if (pesPayloadReader != null) {
tsPayloadReaders.put(elementaryPid, new PesReader(pesPayloadReader, timestampAdjuster)); 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