Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[DASH] Crash when receiving empty SegmentTimeline #1716

Closed
azabujuban opened this issue Aug 4, 2016 · 1 comment
Closed

[DASH] Crash when receiving empty SegmentTimeline #1716

azabujuban opened this issue Aug 4, 2016 · 1 comment
Labels

Comments

@azabujuban
Copy link

When the player receives the following MPD it crashes:

<?xml version="1.0" encoding="utf-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="urn:mpeg:dash:schema:mpd:2011"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
    profiles="urn:mpeg:dash:profile:isoff-live:2011"
    type="dynamic"
    minimumUpdatePeriod="PT0S"
    suggestedPresentationDelay="PT0S"
    publishTime="2016-08-04T07:25:53"
    timeShiftBufferDepth="PT0.0S"
    minBufferTime="PT0.0S">
    <ProgramInformation>
    </ProgramInformation>
    <Period start="PT0.0S">
        <AdaptationSet contentType="audio" segmentAlignment="true" bitstreamSwitching="true">
            <Representation id="0" mimeType="audio/mp4" codecs="mp4a.40.2" bandwidth="128000" audioSamplingRate="22050">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" />
                <SegmentTemplate timescale="22050" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
                    <SegmentTimeline>
                    </SegmentTimeline>
                </SegmentTemplate>
            </Representation>
        </AdaptationSet>
    </Period>
</MPD>

The exception is:

E/AndroidRuntime: FATAL EXCEPTION: ExoPlayerImplInternal:Handler
                  Process: com.google.android.exoplayer2.demo, PID: 8455
                  java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
                      at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
                      at java.util.ArrayList.get(ArrayList.java:308)
                      at com.google.android.exoplayer2.source.dash.manifest.SegmentBase$MultiSegmentBase.getSegmentTimeUs(SegmentBase.java:191)
                      at com.google.android.exoplayer2.source.dash.manifest.Representation$MultiSegmentRepresentation.getTimeUs(Representation.java:252)
                      at com.google.android.exoplayer2.source.dash.DefaultDashChunkSource$RepresentationHolder.updateRepresentation(DefaultDashChunkSource.java:402)
                      at com.google.android.exoplayer2.source.dash.DefaultDashChunkSource.updateManifest(DefaultDashChunkSource.java:128)
                      at com.google.android.exoplayer2.source.dash.DashMediaPeriod.updateManifest(DashMediaPeriod.java:84)
                      at com.google.android.exoplayer2.source.dash.DashMediaSource.updatePeriod(DashMediaSource.java:214)
                      at com.google.android.exoplayer2.source.dash.DashMediaSource.onManifestLoadCompleted(DashMediaSource.java:203)
                      at com.google.android.exoplayer2.source.dash.DashMediaSource$ManifestCallback.onLoadCompleted(DashMediaSource.java:389)
                      at com.google.android.exoplayer2.source.dash.DashMediaSource$ManifestCallback.onLoadCompleted(DashMediaSource.java:383)
                      at com.google.android.exoplayer2.upstream.Loader$LoadTask.handleMessage(Loader.java:356)
                      at android.os.Handler.dispatchMessage(Handler.java:102)
                      at android.os.Looper.loop(Looper.java:148)
                      at android.os.HandlerThread.run(HandlerThread.java:61)
                      at com.google.android.exoplayer2.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)

I originally thought that the crash was related to something else and opened another issue (#1715), but after some investigation it turned out that the crash is not related.

@ojw28
Copy link
Contributor

ojw28 commented Nov 25, 2016

Let's track this using #1865 (they're the same).

@ojw28 ojw28 closed this as completed Nov 25, 2016
@google google locked and limited conversation to collaborators Jun 28, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants