Commit 952bd4e7 by Oliver Woodman

Don't calculate a maximum input size for H.264 on Sony 4k TV.

Issue: #800
parent a764b359
...@@ -560,6 +560,11 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer { ...@@ -560,6 +560,11 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
// Already set. The source of the format may know better, so do nothing. // Already set. The source of the format may know better, so do nothing.
return; return;
} }
if ("BRAVIA 4K 2015".equals(Util.MODEL)) {
// The Sony BRAVIA 4k TV has input buffers that are too small for the calculated 4k video
// maximum input size, so use the default value.
return;
}
int maxHeight = format.getInteger(android.media.MediaFormat.KEY_HEIGHT); int maxHeight = format.getInteger(android.media.MediaFormat.KEY_HEIGHT);
if (codecIsAdaptive && format.containsKey(android.media.MediaFormat.KEY_MAX_HEIGHT)) { if (codecIsAdaptive && format.containsKey(android.media.MediaFormat.KEY_MAX_HEIGHT)) {
maxHeight = Math.max(maxHeight, format.getInteger(android.media.MediaFormat.KEY_MAX_HEIGHT)); maxHeight = Math.max(maxHeight, format.getInteger(android.media.MediaFormat.KEY_MAX_HEIGHT));
......
...@@ -75,6 +75,12 @@ public final class Util { ...@@ -75,6 +75,12 @@ public final class Util {
*/ */
public static final String MANUFACTURER = android.os.Build.MANUFACTURER; public static final String MANUFACTURER = android.os.Build.MANUFACTURER;
/**
* Like {@link android.os.Build#MODEL}, but in a place where it can be conveniently overridden for
* local testing.
*/
public static final String MODEL = android.os.Build.MODEL;
private static final Pattern XS_DATE_TIME_PATTERN = Pattern.compile( private static final Pattern XS_DATE_TIME_PATTERN = Pattern.compile(
"(\\d\\d\\d\\d)\\-(\\d\\d)\\-(\\d\\d)[Tt]" "(\\d\\d\\d\\d)\\-(\\d\\d)\\-(\\d\\d)[Tt]"
+ "(\\d\\d):(\\d\\d):(\\d\\d)(\\.(\\d+))?" + "(\\d\\d):(\\d\\d):(\\d\\d)(\\.(\\d+))?"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment