From 141568ab0e2a4b18620cfcee46dd649dbc9bb1fa Mon Sep 17 00:00:00 2001 From: Julian Cable Date: Sun, 22 Jan 2017 15:13:29 +0000 Subject: [PATCH] better merge --- .../exoplayer2/text/SubtitleDecoderFactory.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/library/src/main/java/com/google/android/exoplayer2/text/SubtitleDecoderFactory.java b/library/src/main/java/com/google/android/exoplayer2/text/SubtitleDecoderFactory.java index ee8a430a71..f7e67fcd68 100644 --- a/library/src/main/java/com/google/android/exoplayer2/text/SubtitleDecoderFactory.java +++ b/library/src/main/java/com/google/android/exoplayer2/text/SubtitleDecoderFactory.java @@ -84,20 +84,13 @@ public interface SubtitleDecoderFactory { if (clazz == null) { throw new IllegalArgumentException("Attempted to create decoder for unsupported format"); } -<<<<<<< HEAD - if(clazz == SSADecoder.class) { + if (format.sampleMimeType.equals(MimeTypes.TEXT_SSA)) { byte[] header = format.initializationData.get(1); String dlgfmt = new String(format.initializationData.get(0), "UTF-8"); return clazz.asSubclass(SubtitleDecoder.class).getConstructor(byte[].class, String.class) .newInstance(header, dlgfmt); } - if (clazz == Cea608Decoder.class) { - return clazz.asSubclass(SubtitleDecoder.class).getConstructor(String.class, Integer.TYPE) - .newInstance(format.sampleMimeType, format.accessibilityChannel); - } - else { -======= - if (format.sampleMimeType.equals(MimeTypes.APPLICATION_CEA608) + else if (format.sampleMimeType.equals(MimeTypes.APPLICATION_CEA608) || format.sampleMimeType.equals(MimeTypes.APPLICATION_MP4CEA608)) { return clazz.asSubclass(SubtitleDecoder.class).getConstructor(String.class, Integer.TYPE) .newInstance(format.sampleMimeType, format.accessibilityChannel); @@ -105,7 +98,6 @@ public interface SubtitleDecoderFactory { return clazz.asSubclass(SubtitleDecoder.class).getConstructor(Integer.TYPE) .newInstance(format.accessibilityChannel); } else { ->>>>>>> upstream/dev-v2 return clazz.asSubclass(SubtitleDecoder.class).getConstructor().newInstance(); } } catch (Exception e) {