Add exception message for MediaCodecRenderer exception.

Otherwise, it's difficult to differentiate between different sources of ERROR_CODE_DECODING_FORMAT_UNSUPPORTED.

PiperOrigin-RevId: 585966636
This commit is contained in:
huangdarwin 2023-11-28 07:13:02 -08:00 committed by Copybara-Service
parent b8c1e22389
commit eb01c3f440

View File

@ -1526,9 +1526,8 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
if (newFormat.sampleMimeType == null) {
// If the new format is invalid, it is either a media bug or it is not intended to be played.
// See also https://github.com/google/ExoPlayer/issues/8283.
throw createRendererException(
new IllegalArgumentException(),
new IllegalArgumentException("Sample MIME type is null."),
newFormat,
PlaybackException.ERROR_CODE_DECODING_FORMAT_UNSUPPORTED);
}