Fix audio track similar comparison for IDs.

This commit is contained in:
Kavin 2022-11-13 23:08:54 +00:00
parent 6d59cdbe3a
commit 30909da1df
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
1 changed files with 3 additions and 1 deletions

View File

@ -25,6 +25,7 @@ import org.schabi.newpipe.extractor.services.youtube.ItagItem;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Objects;
public final class AudioStream extends Stream { public final class AudioStream extends Stream {
public static final int UNKNOWN_BITRATE = -1; public static final int UNKNOWN_BITRATE = -1;
@ -314,7 +315,8 @@ public final class AudioStream extends Stream {
@Override @Override
public boolean equalStats(final Stream cmp) { public boolean equalStats(final Stream cmp) {
return super.equalStats(cmp) && cmp instanceof AudioStream return super.equalStats(cmp) && cmp instanceof AudioStream
&& averageBitrate == ((AudioStream) cmp).averageBitrate; && averageBitrate == ((AudioStream) cmp).averageBitrate
&& Objects.equals(audioTrackId, ((AudioStream) cmp).audioTrackId);
} }
/** /**