mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
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.
This commit is contained in:
parent
924a041743
commit
b2222f8cb7
1 changed files with 3 additions and 1 deletions
|
|
@ -467,7 +467,9 @@ public final class TsExtractor implements Extractor {
|
||||||
pesPayloadReader = id3Reader;
|
pesPayloadReader = id3Reader;
|
||||||
} else {
|
} else {
|
||||||
pesPayloadReader = streamReaderFactory.createStreamReader(streamType, esInfo);
|
pesPayloadReader = streamReaderFactory.createStreamReader(streamType, esInfo);
|
||||||
pesPayloadReader.init(output, new TrackIdGenerator(trackId, MAX_PID_PLUS_ONE));
|
if (pesPayloadReader != null) {
|
||||||
|
pesPayloadReader.init(output, new TrackIdGenerator(trackId, MAX_PID_PLUS_ONE));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pesPayloadReader != null) {
|
if (pesPayloadReader != null) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue