Enable EOS workaround for FireTV Gen 2
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201678261
This commit is contained in:
parent
fcc0bd403f
commit
2043d90a73
@ -405,7 +405,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
||||
codecAdaptationWorkaroundMode = codecAdaptationWorkaroundMode(codecName);
|
||||
codecNeedsDiscardToSpsWorkaround = codecNeedsDiscardToSpsWorkaround(codecName, format);
|
||||
codecNeedsFlushWorkaround = codecNeedsFlushWorkaround(codecName);
|
||||
codecNeedsEosPropagationWorkaround = codecNeedsEosPropagationWorkaround(codecName);
|
||||
codecNeedsEosPropagationWorkaround = codecNeedsEosPropagationWorkaround(codecInfo);
|
||||
codecNeedsEosFlushWorkaround = codecNeedsEosFlushWorkaround(codecName);
|
||||
codecNeedsEosOutputExceptionWorkaround = codecNeedsEosOutputExceptionWorkaround(codecName);
|
||||
codecNeedsMonoChannelCountWorkaround = codecNeedsMonoChannelCountWorkaround(codecName, format);
|
||||
@ -1272,20 +1272,23 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the decoder is known to handle the propagation of the
|
||||
* {@link MediaCodec#BUFFER_FLAG_END_OF_STREAM} flag incorrectly on the host device.
|
||||
* <p>
|
||||
* If true is returned, the renderer will work around the issue by approximating end of stream
|
||||
* Returns whether the decoder is known to handle the propagation of the {@link
|
||||
* MediaCodec#BUFFER_FLAG_END_OF_STREAM} flag incorrectly on the host device.
|
||||
*
|
||||
* <p>If true is returned, the renderer will work around the issue by approximating end of stream
|
||||
* behavior without relying on the flag being propagated through to an output buffer by the
|
||||
* underlying decoder.
|
||||
*
|
||||
* @param name The name of the decoder.
|
||||
* @param codecInfo Information about the {@link MediaCodec}.
|
||||
* @return True if the decoder is known to handle {@link MediaCodec#BUFFER_FLAG_END_OF_STREAM}
|
||||
* propagation incorrectly on the host device. False otherwise.
|
||||
*/
|
||||
private static boolean codecNeedsEosPropagationWorkaround(String name) {
|
||||
return Util.SDK_INT <= 17 && ("OMX.rk.video_decoder.avc".equals(name)
|
||||
|| "OMX.allwinner.video.decoder.avc".equals(name));
|
||||
private static boolean codecNeedsEosPropagationWorkaround(MediaCodecInfo codecInfo) {
|
||||
String name = codecInfo.name;
|
||||
return (Util.SDK_INT <= 17
|
||||
&& ("OMX.rk.video_decoder.avc".equals(name)
|
||||
|| "OMX.allwinner.video.decoder.avc".equals(name)))
|
||||
|| ("Amazon".equals(Util.MANUFACTURER) && "AFTS".equals(Util.MODEL) && codecInfo.secure);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user