File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed 
libraries/exoplayer/src/main/java/androidx/media3/exoplayer/mediacodec Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -382,14 +382,23 @@ private boolean isCodecProfileAndLevelSupported(
382382  }
383383
384384  private  boolean  isCompressedAudioBitDepthSupported (Format  format ) {
385-     // MediaCodec doesn't have a way to query FLAC decoder bit-depth support. 
386-     // c2.android.flac.decoder is known not to support 32-bit until API 34. We optimistically assume 
387-     // that another (unrecognized) FLAC decoder does support 32-bit on all API levels where it 
388-     // exists. 
389-     return  !Objects .equals (format .sampleMimeType , MimeTypes .AUDIO_FLAC )
390-         || format .pcmEncoding  != C .ENCODING_PCM_32BIT 
391-         || SDK_INT  >= 34 
392-         || !name .equals ("c2.android.flac.decoder" );
385+     // MediaCodec doesn't have a way to query decoder bit-depth support. 
386+     if  (!Objects .equals (format .sampleMimeType , MimeTypes .AUDIO_FLAC )
387+         || format .pcmEncoding  != C .ENCODING_PCM_32BIT ) {
388+       // Only 32-bit FLAC is a concern at the moment, everything else can be marked supported. 
389+       return  true ;
390+     }
391+     // c2.android.flac.decoder is known not to support 32-bit until API 34. 
392+     if  (name .equals ("c2.android.flac.decoder" )) {
393+       return  SDK_INT  >= 34 ;
394+     }
395+     // c2.sec.flac.decoder is known not to support 32-bit until API 35. 
396+     if  (name .equals ("c2.sec.flac.decoder" )) {
397+       return  SDK_INT  >= 35 ;
398+     }
399+     // We optimistically assume that another (unrecognized) FLAC decoder does support 32-bit on all 
400+     // API levels where it exists. 
401+     return  true ;
393402  }
394403
395404  /** Whether the codec handles HDR10+ out-of-band metadata. */ 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments