[FFmpeg-devel] vorbis_dec.c on sh4 architecture : floating point exception

Vincent Penné vpenne
Thu Jan 3 15:20:34 CET 2008


Hi,

Balatoni Denes a ?crit :
> Hi!
>
>   
>> On Wed, Jan 02, 2008 at 02:45:51PM +0100, Vincent Penn? wrote:
>>     
>>> It appears that some floating point arrays aren't initialized to any
>>> specific value at allocation time in "vorbis_parse_id_hdr" function,
>>> introducing random and possibly invalid floating point values.
>>> (apparently , sh4 is a bit touchy with invalid floating values)
>>>
>>> Turning the av_malloc calls into av_mallocz calls fixes the problem. As
>>> it is initialisation code, there should be no impact on performance.
>>>       
>
> I think channel_residues and channel_floors are memset 0 at an other point.
> ret, buf and buf_tmp should be written to before reading (if read at all in 
> vorbis_dec). However "saved" is read before written - so
> could you try only setting the "saved" buffer to zero, if that fixes the 
> problem?
> If it does, than that is a change fit for svn imo.
>   
I tried what you suggested, it seems to be indeed sufficient.

A patch against ffmpeg rev.11385 is attached.

-- 
Vincent Penne.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vorbis_dec.patch
Type: text/x-patch
Size: 875 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080103/381130db/attachment.bin>



More information about the ffmpeg-devel mailing list