com.google.android.exoplayer.ParserException

Here are the examples of the java api class com.google.android.exoplayer.ParserException taken from open source projects.

1. SubtitleParserHelper#handleSample()

Project: ExoPlayer
Source File: SubtitleParserHelper.java
View license
private void handleSample(long sampleTimeUs, SampleHolder holder) {
    Subtitle parsedSubtitle = null;
    ParserException error = null;
    RuntimeException runtimeError = null;
    try {
        parsedSubtitle = parser.parse(holder.data.array(), 0, holder.size);
    } catch (ParserException e) {
        error = e;
    } catch (RuntimeException e) {
        runtimeError = e;
    }
    synchronized (this) {
        if (sampleHolder != holder) {
        // A flush has occurred since this holder was posted. Do nothing.
        } else {
            this.result = new PlayableSubtitle(parsedSubtitle, subtitlesAreRelative, sampleTimeUs, subtitleOffsetUs);
            this.error = error;
            this.runtimeError = runtimeError;
            this.parsing = false;
        }
    }
}