Changed AndroidVideoDecoder to also handle IllegalArgumentException and IllegalStateException during the init of the decoder and fallback to a software decoder
Bug: webrtc:11785 Change-Id: I984d65947274b62fdcae20772537d20851cb25ba Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180460 Commit-Queue: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31856}
This commit is contained in:

committed by
Commit Bot

parent
dd6588d7c1
commit
2a8f226374
1
AUTHORS
1
AUTHORS
@ -130,3 +130,4 @@ CoSMo Software Consulting, Pte Ltd <*@cosmosoftware.io>
|
||||
Tuple, LLC <*@tuple.app>
|
||||
Videona Socialmedia <*@videona.com>
|
||||
Threema GmbH <*@threema.ch>
|
||||
Dennis Angelo <dennis.angelo@gmail.com>
|
||||
|
@ -180,7 +180,7 @@ class AndroidVideoDecoder implements VideoDecoder, VideoSink {
|
||||
|
||||
try {
|
||||
codec = mediaCodecWrapperFactory.createByCodecName(codecName);
|
||||
} catch (IOException | IllegalArgumentException e) {
|
||||
} catch (IOException | IllegalArgumentException | IllegalStateException e) {
|
||||
Logging.e(TAG, "Cannot create media decoder " + codecName);
|
||||
return VideoCodecStatus.FALLBACK_SOFTWARE;
|
||||
}
|
||||
@ -191,7 +191,7 @@ class AndroidVideoDecoder implements VideoDecoder, VideoSink {
|
||||
}
|
||||
codec.configure(format, surface, null, 0);
|
||||
codec.start();
|
||||
} catch (IllegalStateException e) {
|
||||
} catch (IllegalStateException | IllegalArgumentException e) {
|
||||
Logging.e(TAG, "initDecode failed", e);
|
||||
release();
|
||||
return VideoCodecStatus.FALLBACK_SOFTWARE;
|
||||
|
Reference in New Issue
Block a user