[FFmpeg-devel] vorbis_dec.c on sh4 architecture : floating point exception
Balatoni Denes
dbalatoni
Thu Jan 3 22:03:59 CET 2008
Hi!
Thursday 03 January 2008 15:20-kor Vincent Penn? ezt ?rta:
> 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.
Great, thank you for checking!
> A patch against ffmpeg rev.11385 is attached.
Patch looks OK for me (as vorbis maintainer).
bye
Denes
More information about the ffmpeg-devel
mailing list