Skip to content

Crash possible in stereo rate switching with DTX

In stereo rate switching with DTX where both rates < 48 and >= 48 kbps are present in the switching pattern, a crash is possible due to st->hTcxDec->old_synthFB_fx being NULL. This is likely the result of having function stereo_memory_dec() not converted yet. This function handles allocation and deallocation of arrays and structures when switching between different stereo technologies. The mentioned array is not taken care of there. This will be probably fixed when conversion of the stereo switching framework is done. This issue is more for visibility (I am unsure if this can be triggered by the CI tests) and to avoid multiple people debugging the same thing multiple times.

Reproduce with:

./IVAS_cod -stereo -dtx -max_band fb ivas-codec/scripts/switchPaths/sw_fb1.bin 48 ltv48_STEREO.wav bit
./IVAS_dec stereo 48 bit out.wav

Here, the issue happens in frame 144.