better merge

This commit is contained in:
Julian Cable 2017-01-22 15:13:29 +00:00
parent 6ec840cc80
commit 141568ab0e

View file

@ -84,20 +84,13 @@ public interface SubtitleDecoderFactory {
if (clazz == null) { if (clazz == null) {
throw new IllegalArgumentException("Attempted to create decoder for unsupported format"); throw new IllegalArgumentException("Attempted to create decoder for unsupported format");
} }
<<<<<<< HEAD if (format.sampleMimeType.equals(MimeTypes.TEXT_SSA)) {
if(clazz == SSADecoder.class) {
byte[] header = format.initializationData.get(1); byte[] header = format.initializationData.get(1);
String dlgfmt = new String(format.initializationData.get(0), "UTF-8"); String dlgfmt = new String(format.initializationData.get(0), "UTF-8");
return clazz.asSubclass(SubtitleDecoder.class).getConstructor(byte[].class, String.class) return clazz.asSubclass(SubtitleDecoder.class).getConstructor(byte[].class, String.class)
.newInstance(header, dlgfmt); .newInstance(header, dlgfmt);
} }
if (clazz == Cea608Decoder.class) { else if (format.sampleMimeType.equals(MimeTypes.APPLICATION_CEA608)
return clazz.asSubclass(SubtitleDecoder.class).getConstructor(String.class, Integer.TYPE)
.newInstance(format.sampleMimeType, format.accessibilityChannel);
}
else {
=======
if (format.sampleMimeType.equals(MimeTypes.APPLICATION_CEA608)
|| format.sampleMimeType.equals(MimeTypes.APPLICATION_MP4CEA608)) { || format.sampleMimeType.equals(MimeTypes.APPLICATION_MP4CEA608)) {
return clazz.asSubclass(SubtitleDecoder.class).getConstructor(String.class, Integer.TYPE) return clazz.asSubclass(SubtitleDecoder.class).getConstructor(String.class, Integer.TYPE)
.newInstance(format.sampleMimeType, format.accessibilityChannel); .newInstance(format.sampleMimeType, format.accessibilityChannel);
@ -105,7 +98,6 @@ public interface SubtitleDecoderFactory {
return clazz.asSubclass(SubtitleDecoder.class).getConstructor(Integer.TYPE) return clazz.asSubclass(SubtitleDecoder.class).getConstructor(Integer.TYPE)
.newInstance(format.accessibilityChannel); .newInstance(format.accessibilityChannel);
} else { } else {
>>>>>>> upstream/dev-v2
return clazz.asSubclass(SubtitleDecoder.class).getConstructor().newInstance(); return clazz.asSubclass(SubtitleDecoder.class).getConstructor().newInstance();
} }
} catch (Exception e) { } catch (Exception e) {