mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Merge pull request #1979 from vitekn/dev-v2
Fix NPE in TsExtractor when ElementaryStreamReaderFactory returns null
This commit is contained in:
commit
e4bafd964d
1 changed files with 3 additions and 1 deletions
|
|
@ -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));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue