Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
af4b891c
authored
Jun 03, 2021
by
aquilescanta
Committed by
bachinger
Jun 03, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Use UnrecognizedFormatException for progressive media only
PiperOrigin-RevId: 377303025
parent
2b6581af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
library/common/src/main/java/com/google/android/exoplayer2/ParserException.java
library/core/src/main/java/com/google/android/exoplayer2/source/UnrecognizedInputFormatException.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java
library/common/src/main/java/com/google/android/exoplayer2/ParserException.java
View file @
af4b891c
...
...
@@ -135,7 +135,7 @@ public class ParserException extends IOException {
this
(
/* message= */
null
,
cause
,
/* contentIsMalformed= */
true
,
C
.
DATA_TYPE_UNKNOWN
);
}
pr
ivate
ParserException
(
pr
otected
ParserException
(
@Nullable
String
message
,
@Nullable
Throwable
cause
,
boolean
contentIsMalformed
,
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/UnrecognizedInputFormatException.java
View file @
af4b891c
...
...
@@ -16,6 +16,7 @@
package
com
.
google
.
android
.
exoplayer2
.
source
;
import
android.net.Uri
;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.ParserException
;
/** 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.
*/
public
UnrecognizedInputFormatException
(
String
message
,
Uri
uri
)
{
super
(
message
);
super
(
message
,
/* cause= */
null
,
/* contentIsMalformed= */
false
,
C
.
DATA_TYPE_MEDIA
);
this
.
uri
=
uri
;
}
}
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java
View file @
af4b891c
...
...
@@ -30,7 +30,6 @@ import com.google.android.exoplayer2.drm.DrmInitData;
import
com.google.android.exoplayer2.drm.DrmInitData.SchemeData
;
import
com.google.android.exoplayer2.extractor.mp4.PsshAtomUtil
;
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.VariantInfo
;
import
com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist.Rendition
;
...
...
@@ -255,8 +254,8 @@ public final class HlsPlaylistParser implements ParsingLoadable.Parser<HlsPlayli
String
line
;
try
{
if
(!
checkPlaylistHeader
(
reader
))
{
throw
new
UnrecognizedInputFormatException
(
"Input does not start with the #EXTM3U header."
,
uri
);
throw
ParserException
.
createForMalformedManifest
(
/* message= */
"Input does not start with the #EXTM3U header."
,
/* cause= */
null
);
}
while
((
line
=
reader
.
readLine
())
!=
null
)
{
line
=
line
.
trim
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment