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
979fd083
authored
Sep 28, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Don't invoke adaptiveTrack with 0 or 1 representations.
0 will crash. 1 is pointless.
parent
e8895c87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
library/src/main/java/com/google/android/exoplayer/dash/DefaultDashTrackSelector.java
library/src/main/java/com/google/android/exoplayer/smoothstreaming/DefaultSmoothStreamingTrackSelector.java
library/src/main/java/com/google/android/exoplayer/dash/DefaultDashTrackSelector.java
View file @
979fd083
...
@@ -84,8 +84,11 @@ public final class DefaultDashTrackSelector implements DashTrackSelector {
...
@@ -84,8 +84,11 @@ public final class DefaultDashTrackSelector implements DashTrackSelector {
}
else
{
}
else
{
representations
=
Util
.
firstIntegersArray
(
adaptationSet
.
representations
.
size
());
representations
=
Util
.
firstIntegersArray
(
adaptationSet
.
representations
.
size
());
}
}
output
.
adaptiveTrack
(
manifest
,
periodIndex
,
i
,
representations
);
int
representationCount
=
representations
.
length
;
for
(
int
j
=
0
;
j
<
representations
.
length
;
j
++)
{
if
(
representationCount
>
1
)
{
output
.
adaptiveTrack
(
manifest
,
periodIndex
,
i
,
representations
);
}
for
(
int
j
=
0
;
j
<
representationCount
;
j
++)
{
output
.
fixedTrack
(
manifest
,
periodIndex
,
i
,
representations
[
j
]);
output
.
fixedTrack
(
manifest
,
periodIndex
,
i
,
representations
[
j
]);
}
}
}
else
{
}
else
{
...
...
library/src/main/java/com/google/android/exoplayer/smoothstreaming/DefaultSmoothStreamingTrackSelector.java
View file @
979fd083
...
@@ -50,8 +50,11 @@ public final class DefaultSmoothStreamingTrackSelector implements SmoothStreamin
...
@@ -50,8 +50,11 @@ public final class DefaultSmoothStreamingTrackSelector implements SmoothStreamin
if
(
streamElementType
==
StreamElement
.
TYPE_VIDEO
)
{
if
(
streamElementType
==
StreamElement
.
TYPE_VIDEO
)
{
int
[]
trackIndices
=
VideoFormatSelectorUtil
.
selectVideoFormatsForDefaultDisplay
(
int
[]
trackIndices
=
VideoFormatSelectorUtil
.
selectVideoFormatsForDefaultDisplay
(
context
,
Arrays
.
asList
(
manifest
.
streamElements
[
i
].
tracks
),
null
,
false
);
context
,
Arrays
.
asList
(
manifest
.
streamElements
[
i
].
tracks
),
null
,
false
);
output
.
adaptiveTrack
(
manifest
,
i
,
trackIndices
);
int
trackCount
=
trackIndices
.
length
;
for
(
int
j
=
0
;
j
<
trackIndices
.
length
;
j
++)
{
if
(
trackCount
>
1
)
{
output
.
adaptiveTrack
(
manifest
,
i
,
trackIndices
);
}
for
(
int
j
=
0
;
j
<
trackCount
;
j
++)
{
output
.
fixedTrack
(
manifest
,
i
,
trackIndices
[
j
]);
output
.
fixedTrack
(
manifest
,
i
,
trackIndices
[
j
]);
}
}
}
else
{
}
else
{
...
...
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