mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Use UnrecognizedFormatException for progressive media only
PiperOrigin-RevId: 377303025
This commit is contained in:
parent
2b6581afe0
commit
af4b891c99
3 changed files with 5 additions and 5 deletions
|
|
@ -135,7 +135,7 @@ public class ParserException extends IOException {
|
||||||
this(/* message= */ null, cause, /* contentIsMalformed= */ true, C.DATA_TYPE_UNKNOWN);
|
this(/* message= */ null, cause, /* contentIsMalformed= */ true, C.DATA_TYPE_UNKNOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ParserException(
|
protected ParserException(
|
||||||
@Nullable String message,
|
@Nullable String message,
|
||||||
@Nullable Throwable cause,
|
@Nullable Throwable cause,
|
||||||
boolean contentIsMalformed,
|
boolean contentIsMalformed,
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
package com.google.android.exoplayer2.source;
|
package com.google.android.exoplayer2.source;
|
||||||
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import com.google.android.exoplayer2.C;
|
||||||
import com.google.android.exoplayer2.ParserException;
|
import com.google.android.exoplayer2.ParserException;
|
||||||
|
|
||||||
/** Thrown if the input format was not recognized. */
|
/** Thrown if the input format was not recognized. */
|
||||||
|
|
@ -29,7 +30,7 @@ public class UnrecognizedInputFormatException extends ParserException {
|
||||||
* @param uri The {@link Uri} from which the unrecognized data was read.
|
* @param uri The {@link Uri} from which the unrecognized data was read.
|
||||||
*/
|
*/
|
||||||
public UnrecognizedInputFormatException(String message, Uri uri) {
|
public UnrecognizedInputFormatException(String message, Uri uri) {
|
||||||
super(message);
|
super(message, /* cause= */ null, /* contentIsMalformed= */ false, C.DATA_TYPE_MEDIA);
|
||||||
this.uri = uri;
|
this.uri = uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ import com.google.android.exoplayer2.drm.DrmInitData;
|
||||||
import com.google.android.exoplayer2.drm.DrmInitData.SchemeData;
|
import com.google.android.exoplayer2.drm.DrmInitData.SchemeData;
|
||||||
import com.google.android.exoplayer2.extractor.mp4.PsshAtomUtil;
|
import com.google.android.exoplayer2.extractor.mp4.PsshAtomUtil;
|
||||||
import com.google.android.exoplayer2.metadata.Metadata;
|
import com.google.android.exoplayer2.metadata.Metadata;
|
||||||
import com.google.android.exoplayer2.source.UnrecognizedInputFormatException;
|
|
||||||
import com.google.android.exoplayer2.source.hls.HlsTrackMetadataEntry;
|
import com.google.android.exoplayer2.source.hls.HlsTrackMetadataEntry;
|
||||||
import com.google.android.exoplayer2.source.hls.HlsTrackMetadataEntry.VariantInfo;
|
import com.google.android.exoplayer2.source.hls.HlsTrackMetadataEntry.VariantInfo;
|
||||||
import com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist.Rendition;
|
import com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist.Rendition;
|
||||||
|
|
@ -255,8 +254,8 @@ public final class HlsPlaylistParser implements ParsingLoadable.Parser<HlsPlayli
|
||||||
String line;
|
String line;
|
||||||
try {
|
try {
|
||||||
if (!checkPlaylistHeader(reader)) {
|
if (!checkPlaylistHeader(reader)) {
|
||||||
throw new UnrecognizedInputFormatException(
|
throw ParserException.createForMalformedManifest(
|
||||||
"Input does not start with the #EXTM3U header.", uri);
|
/* message= */ "Input does not start with the #EXTM3U header.", /* cause= */ null);
|
||||||
}
|
}
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue