Skip to content

Commit

Permalink
[Android] Ignore obsolete DOVI profiles from codec selection
Browse files Browse the repository at this point in the history
When the AVDOVIDecoderConfigurationRecord is not valid, the fields are zeroed
and profile is set to 1, which is incorrect. It should default to profile 0.

Fixes xbmc#24171
  • Loading branch information
quietvoid authored and 78andyp committed Dec 19, 2023
1 parent 04df277 commit 0145486
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,26 +540,19 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio
switch (m_hints.dovi.dv_profile)
{
case 0:
profile = CJNIMediaCodecInfoCodecProfileLevel::DolbyVisionProfileDvavPer;
break;
case 1:
profile = CJNIMediaCodecInfoCodecProfileLevel::DolbyVisionProfileDvavPen;
break;
case 2:
profile = CJNIMediaCodecInfoCodecProfileLevel::DolbyVisionProfileDvheDer;
break;
case 3:
profile = CJNIMediaCodecInfoCodecProfileLevel::DolbyVisionProfileDvheDen;
case 6:
// obsolete profiles that are not supported in current applications.
// 0 is ignored in case the AVDOVIDecoderConfigurationRecord hint is unset.
break;
case 4:
profile = CJNIMediaCodecInfoCodecProfileLevel::DolbyVisionProfileDvheDtr;
break;
case 5:
profile = CJNIMediaCodecInfoCodecProfileLevel::DolbyVisionProfileDvheStn;
break;
case 6:
profile = CJNIMediaCodecInfoCodecProfileLevel::DolbyVisionProfileDvheDth;
break;
case 7:
// set profile 8 when converting
if (convertDovi && CJNIBase::GetSDKVersion() >= 27)
Expand Down

0 comments on commit 0145486

Please sign in to comment.