mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Relax MediaCodecVideoTrackRenderer.canReconfigureCodec().
Allow non-H264 adaptive decoders.
This commit is contained in:
parent
bf5ee6ff23
commit
bc01a4f48d
1 changed files with 3 additions and 5 deletions
|
|
@ -330,11 +330,9 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
|
||||||
@Override
|
@Override
|
||||||
protected boolean canReconfigureCodec(MediaCodec codec, boolean codecIsAdaptive,
|
protected boolean canReconfigureCodec(MediaCodec codec, boolean codecIsAdaptive,
|
||||||
MediaFormat oldFormat, MediaFormat newFormat) {
|
MediaFormat oldFormat, MediaFormat newFormat) {
|
||||||
// TODO: Relax this check to also allow non-H264 adaptive decoders.
|
return newFormat.mimeType.equals(oldFormat.mimeType)
|
||||||
return newFormat.mimeType.equals(MimeTypes.VIDEO_H264)
|
&& (codecIsAdaptive
|
||||||
&& oldFormat.mimeType.equals(MimeTypes.VIDEO_H264)
|
|| (oldFormat.width == newFormat.width && oldFormat.height == newFormat.height));
|
||||||
&& codecIsAdaptive
|
|
||||||
|| (oldFormat.width == newFormat.width && oldFormat.height == newFormat.height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue