[FFmpeg-devel] cur_channel is wrong in AAC encoder / search_for_ms
Mon May 10 09:27:57 CEST 2010
[Erroneously sent this to libav-user earlier]
Hello ffmpeg-devel. I'm doing stereo encoding with the AAC encoder (r23058) but occasionally get SIGSEGV. I have tracked things down to this (probable) cause:
In aacenc.c:546 (large for-loop of aac_encode_frame), s->cur_channel is set to 0, then 1. In aacenc.c:580, search_for_ms gets called with cur_channel == 1. So in aaccoder.c:890-891 of (search_for_ms, calculating band1 address and then using it), the array index is too high. In a heavy loaded environment, this leads to segfaults.
My workaround for now is to set cur_channel to 0 right before call to search_for_ms. No more segfaults, but probably not the totally right thing<tm> either?
Thanks for any response and insights. Sorry if this have been discussed earlier, just joined the list.
More information about the ffmpeg-devel