Skip to content

rtpmp4adepay: Export LATM-multiplexed data as LOAS

This fix is relevant for Bluetooth AAC transmissions, especially those from Apple devices (which use AAC instead of SBC). Without this fix, Bluetooth A2DP signals from these devices cannot be decoded in GStreamer.

Since the data is pure LATM, not full LOAS, and the other elements (aacparse, avdec_aac_latm etc.) expect LOAS, we convert to LOAS before pushing data downstream.

The patch assumes that incoming RTP packets contain payloads no larger than 8192 bytes. With Bluetooth and RTP, this size is unlikely to be exceeded. The alternative would be to patch aacparse, which is much more complicated, since (a) there would have to be a new stream-format type ("latm" in addition to "loas" and "raw"), and in aacparse, one would have to convert LATM to raw, which may be rather complicated (especially if in-band configuration changes arrive over LATM). So, the presented patch seems to be the least painful option.

(This is an updated version of !246 (closed) , based on a separate branch. not on master.)

Merge request reports