File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
symphonia-codec-aac/src/aac Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -375,7 +375,14 @@ impl AacDecoder {
375375 }
376376 for _ in 0 ..count {
377377 // ext payload
378- bs. ignore_bits ( 8 ) ?;
378+ let ext_type = bs. read_bits_leq32 ( 4 ) ?;
379+
380+ // 13 == Parametric Stereo (HE-AAC v2)
381+ // 14 == SBR (HE-AAC)
382+ if ext_type == 13 || ext_type == 14 {
383+ self . m4ainfo . sbr_present = true ;
384+ }
385+ bs. ignore_bits ( 4 ) ?;
379386 }
380387 }
381388 7 => {
@@ -453,7 +460,11 @@ impl Decoder for AacDecoder {
453460
454461 //print!("edata:"); for s in edata.iter() { print!(" {:02X}", *s);}println!("");
455462
456- if ( m4ainfo. otype != M4AType :: Lc ) || ( m4ainfo. channels > 2 ) || ( m4ainfo. samples != 1024 ) {
463+ if ( m4ainfo. otype != M4AType :: Lc )
464+ || ( m4ainfo. sbr_present )
465+ || ( m4ainfo. channels > 2 )
466+ || ( m4ainfo. samples != 1024 )
467+ {
457468 return unsupported_error ( "aac: aac too complex" ) ;
458469 }
459470
You can’t perform that action at this time.
0 commit comments