[FFmpeg-devel] [PATCH] alac : check readsamplesize
Jai Menon
realityman
Mon Jul 14 10:51:06 CEST 2008
Hi,
> Hi,
>
> Jai Menon wrote:
> > Hi,
>
> >
> >> check readsamplesize in alac, with the current code, it could be
> >> negative or bigger than 17 (and get_bits will fail).
> >>
> >
> > And what about 24-bit alac streams? not to mention multi-channel alac if
> possible
> > that is...
> ATM ffmpeg decoder doesn't support 24-bit stream, nor multi-channel :
> - get_bits will return garbage if readsamplesize > 17
So isn't it better if we just check if channels>2 or wasted_bytes is nonzero
> - in the 24-bit stream I saw on mplayer sample, wasted_bytes is used, so
> readsamplesize could be less than 17, but our decoder doesn't handle it
> correctly
> - for not 16-bit stream, we got 'FIXME: unimplemented sample size'.
> - MAX_CHANNELS is 2
>
> So until we implement correct support for multi-channel and other bits
> per sample, I think this check is safe.
>
Hmm..couldn't we just add a check to see if the stream is multichannel or > 16
bits sample size and return an error from decode_frame instead of checking each value
explicitly? or maybe i'm confused...
Anyway michael is ffalac maintainer so he will surely comment.
>
> Matthieu
Regards,
Jai Menon
<realityman at gmx.net>
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
More information about the ffmpeg-devel
mailing list