Commit a1ecf319 by aquilescanta Committed by Oliver Woodman

Assign ERROR_CODE_PARSING_* to ParsingException

PiperOrigin-RevId: 375515685
parent 6a8b9557
......@@ -572,6 +572,20 @@ import java.util.concurrent.atomic.AtomicBoolean;
stopInternal(/* forceResetRenderers= */ true, /* acknowledgeStop= */ false);
playbackInfo = playbackInfo.copyWithPlaybackError(e);
}
} catch (ParserException e) {
int errorCode = PlaybackException.ERROR_CODE_UNSPECIFIED;
if (e.dataType == C.DATA_TYPE_MEDIA) {
errorCode =
e.contentIsMalformed
? PlaybackException.ERROR_CODE_PARSING_CONTAINER_MALFORMED
: PlaybackException.ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED;
} else if (e.dataType == C.DATA_TYPE_MANIFEST) {
errorCode =
e.contentIsMalformed
? PlaybackException.ERROR_CODE_PARSING_MANIFEST_MALFORMED
: PlaybackException.ERROR_CODE_PARSING_MANIFEST_UNSUPPORTED;
}
handleIoException(e, errorCode);
} catch (HttpDataSource.InvalidResponseCodeException e) {
handleIoException(e, PlaybackException.ERROR_CODE_IO_BAD_HTTP_STATUS);
} catch (BehindLiveWindowException e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment