MediaCodecsXmlParser: append variants instead of replacing
When adding variants for a codec, instead of replacing the existing
ones, append to that list.
MediaCodecXmlParser is first called for media_codecs.xml which has variants
for some of the codecs and then called for media_codecs_performance.xml
which may not contain variant information.
As the variants were replacing the existing ones, variants initilized from
media_codecs.xml were replaced by empty variants parsed from
media_codecs_performance.xml.
This caused an error in Codec2InfoBuilder.cpp as it didn't get the
variants from media_codecs.xml.
Bug: 368244438
Test: adb shell dumpsys media.player on slow-cpu device and verify
c2.android.vp9.encoder and c2.android.hevc.encoder are not listed.
Change-Id: Id04ac95eb87de9f13f304ed7fe7a8ff9f975d7d7
1 file changed