Set default max input size for H.263 and MPEG-4 video.

The minimum compression ratio matches the Nexus 5X MPEG-4 video decoder.

Issue: #1290
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117234657
This commit is contained in:
olly 2016-03-15 06:52:10 -07:00 committed by Oliver Woodman
parent 9d5aa0f983
commit 5f3fa3955b

View File

@ -567,6 +567,11 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
int maxPixels;
int minCompressionRatio;
switch (format.sampleMimeType) {
case MimeTypes.VIDEO_H263:
case MimeTypes.VIDEO_MP4V:
maxPixels = maxWidth * maxHeight;
minCompressionRatio = 2;
break;
case MimeTypes.VIDEO_H264:
if ("BRAVIA 4K 2015".equals(Util.MODEL)) {
// The Sony BRAVIA 4k TV has input buffers that are too small for the calculated 4k video