mirror of
https://github.com/androidx/media.git
synced 2025-05-14 19:19:58 +08:00
Relax MediaCodecVideoTrackRenderer.canReconfigureCodec().
Allow non-H264 adaptive decoders.
This commit is contained in:
parent
bf5ee6ff23
commit
bc01a4f48d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user