File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/player Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4175,16 +4175,17 @@ private void useVideoSource(final boolean videoEnabled) {
41754175 hideSystemUIIfNeeded ();
41764176 }
41774177
4178- final int videoRenderIndex = getVideoRendererIndex ();
4179-
4180- // The current metadata may be null sometimes so we will be not able to execute the
4181- // block above. Reload the play queue manager in this case .
4178+ // The current metadata may be null sometimes (for e.g. when using an unstable connection
4179+ // in livestreams) so we will be not able to execute the block below.
4180+ // Reload the play queue manager in this case, which is the behavior when the video stream
4181+ // played is not video only or when we don't know the index of the video renderer .
41824182 if (currentMetadata == null ) {
41834183 reloadPlayQueueManager ();
41844184 setRecovery ();
41854185 return ;
41864186 }
41874187
4188+ final int videoRenderIndex = getVideoRendererIndex ();
41884189 final StreamInfo info = currentMetadata .getMetadata ();
41894190
41904191 /* For video streams: we don't want to stream in background the video stream so if the
You can’t perform that action at this time.
0 commit comments