fix: reset video stream sizes on audio track selection
This commit is contained in:
parent
694418d30d
commit
39a5c8bdfb
|
@ -261,6 +261,7 @@ public class DownloadDialog extends DialogFragment
|
|||
final StreamSizeWrapper<AudioStream> audioStreams = getWrappedAudioStreams();
|
||||
final var secondaryStreams = new SparseArrayCompat<SecondaryStreamHelper<AudioStream>>(4);
|
||||
final List<VideoStream> videoStreams = wrappedVideoStreams.getStreamsList();
|
||||
wrappedVideoStreams.resetSizes();
|
||||
|
||||
for (int i = 0; i < videoStreams.size(); i++) {
|
||||
if (!videoStreams.get(i).isVideoOnly()) {
|
||||
|
|
|
@ -235,7 +235,7 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
|
|||
this.unknownSize = context == null
|
||||
? "--.-" : context.getString(R.string.unknown_content);
|
||||
|
||||
Arrays.fill(streamSizes, -2);
|
||||
resetSizes();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -269,6 +269,10 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
|
|||
.onErrorReturnItem(true);
|
||||
}
|
||||
|
||||
public void resetSizes() {
|
||||
Arrays.fill(streamSizes, -2);
|
||||
}
|
||||
|
||||
public static <X extends Stream> StreamSizeWrapper<X> empty() {
|
||||
//noinspection unchecked
|
||||
return (StreamSizeWrapper<X>) EMPTY;
|
||||
|
|
Loading…
Reference in New Issue