[vlc-devel] [Patch] Correcting potential crash in audio bandlimited resampler

Rafaël Carré rafael.carre at gmail.com
Wed Nov 25 18:14:30 CET 2009


On Thu, 19 Nov 2009 16:11:30 +0100
Hugo Beauzee-Luyssen <beauze.h at gmail.com> wrote:

> 2009/11/19 Rémi Denis-Courmont <remi at remlab.net>:
> > Le jeudi 19 novembre 2009 13:22:01 Hugo Beauzee-Luyssen, vous avez
> > écrit :
> >> Hi,
> >>
> >> The bandlimited resampler uses
> >> p_filter->fmt_in.audio.i_bytes_per_frame, which may not be filled.
> >> This patch computes the value when needed.
> >
> > I think you are not allowed to change format from the filtering
> > callbacks.
> >
> 
> I don't know this part of the code, however, in some cases,
> i_bytes_per_frame is equal to 0, which cause FPE to occur, this was
> the quickest workaround I found, but as the i_bytes_per_frame field is
> tagged as optionnal in the struct declaration (if I'm not mistaking),
> I guess using it is defective by design...

I don't know if all audio codecs have a fixed frame size, if we can
find it from the decoder then we should enforce setting of this flag

-- 
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20091125/b393ab04/attachment.sig>


More information about the vlc-devel mailing list