diff --git a/app/src/main/java/ie/macinnes/tvheadend/player/HtspExtractor.java b/app/src/main/java/ie/macinnes/tvheadend/player/HtspExtractor.java index 7de9fd9..e5b378a 100644 --- a/app/src/main/java/ie/macinnes/tvheadend/player/HtspExtractor.java +++ b/app/src/main/java/ie/macinnes/tvheadend/player/HtspExtractor.java @@ -168,12 +168,13 @@ private void handleSubscriptionStart(@NonNull final HtspMessage message) { final int streamIndex = stream.getInteger("index"); final String streamType = stream.getString("type"); - Log.d(TAG, "Creating StreamReader for " + streamType + " stream at index " + streamIndex); - final StreamReader streamReader = streamReadersFactory.createStreamReader(streamType); if (streamReader != null) { + Log.d(TAG, "Creating StreamReader for " + streamType + " stream at index " + streamIndex); streamReader.createTracks(stream, mOutput); mStreamReaders.put(streamIndex, streamReader); + } else { + Log.d(TAG, "Discarding stream at index " + streamIndex + ", no suitable StreamReader"); } }