Commit bc01a4f4 by Oliver Woodman

Relax MediaCodecVideoTrackRenderer.canReconfigureCodec().

Allow non-H264 adaptive decoders.
parent bf5ee6ff
......@@ -330,11 +330,9 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
@Override
protected boolean canReconfigureCodec(MediaCodec codec, boolean codecIsAdaptive,
MediaFormat oldFormat, MediaFormat newFormat) {
// TODO: Relax this check to also allow non-H264 adaptive decoders.
return newFormat.mimeType.equals(MimeTypes.VIDEO_H264)
&& oldFormat.mimeType.equals(MimeTypes.VIDEO_H264)
&& codecIsAdaptive
|| (oldFormat.width == newFormat.width && oldFormat.height == newFormat.height);
return newFormat.mimeType.equals(oldFormat.mimeType)
&& (codecIsAdaptive
|| (oldFormat.width == newFormat.width && oldFormat.height == newFormat.height));
}
@Override
......
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