[libav-devel] [PATCH 1/2] aac: Don't fail if channels aren't known yet

nu774 honeycomb77 at gmail.com
Thu Jun 4 10:33:42 CEST 2015


> The patch itself looks a little strange since you have multiple
> code-paths ending up there and you probably want just to not fail on one
> of them and just that one.

When channel_config in ADTS hdr is zero, the call to 
frame_configure_element() in aac_decode_frame_int(), just after 
parse_adts_frame_header(), was failing, since channel layout is unknown 
at this point.

If PCE is in the payload, we get channel layout from it, and 
frame_configure_element() is called again at this point.
If not, since channels are not configured, get_che() simply fails anyway 
(until PCE comes).

So basically, that patch delays the timing of failure to allow PCE based 
channel configuration inside of payload.

If you want to fix exactly "just that one", maybe it's enough to wrap 
the call to frame_configure_elements() at that point by if 
(avctx->channels) {}  instead of the patch.



More information about the libav-devel mailing list