From fe68203494be491b2dae8e95a7dfebe0906b69f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Kalliom=C3=A4ki?= Date: Wed, 18 Jul 2018 15:11:59 +0200 Subject: [PATCH] Allow calling SoftwareVideoDecoderFactory#createDecoder(String). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, this would crash with UnsupportedOperationException. Allows still calling this while the method is deprecated. Bug: webrtc:9536, webrtc:7925 Change-Id: I7b88cecca7a4e6f505c7211cf2eb576c394973f8 Reviewed-on: https://webrtc-review.googlesource.com/89381 Reviewed-by: Paulina Hensman Commit-Queue: Sami Kalliomäki Cr-Commit-Position: refs/heads/master@{#24025} --- .../api/org/webrtc/SoftwareVideoDecoderFactory.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java b/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java index e0a3dc80db..86dfb7a2c6 100644 --- a/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java +++ b/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java @@ -16,6 +16,13 @@ import java.util.List; import javax.annotation.Nullable; public class SoftwareVideoDecoderFactory implements VideoDecoderFactory { + @Deprecated + @Nullable + @Override + public VideoDecoder createDecoder(String codecType) { + return createDecoder(new VideoCodecInfo(codecType, new HashMap<>())); + } + @Nullable @Override public VideoDecoder createDecoder(VideoCodecInfo codecType) {