[FFmpeg-devel] ADPCM task (was Re: files in incoming)
Reimar Döffinger
Reimar.Doeffinger
Thu Jan 29 22:03:29 CET 2009
On Thu, Jan 29, 2009 at 08:40:53PM +0100, Stefan Gehrer wrote:
> Index: libavcodec/adpcm.c
> ===================================================================
> --- libavcodec/adpcm.c (revision 16828)
> +++ libavcodec/adpcm.c (working copy)
> @@ -1300,9 +1300,10 @@
> }
>
> for (channel=0; channel<avctx->channels; channel++) {
> - srcC = src + (big_endian ? bytestream_get_be32(&src)
> - : bytestream_get_le32(&src))
> - + (avctx->channels-channel-1) * 4;
> + uint32_t offset = (big_endian ? bytestream_get_be32(&src)
> + : bytestream_get_le32(&src));
> +
> + srcC = src + offset + (avctx->channels-channel-1) * 4;
He, that is obviously true. The code does have another issue though,
it never checks for the end of src, so there may be overreads which show
up in valgrind.
I hacked together a patch for it but don't have the motivation to clean
it up...
Greetings,
Reimar D?ffinger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adpcm_check.diff
Type: text/x-diff
Size: 1613 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090129/da8a97cd/attachment.diff>
More information about the ffmpeg-devel
mailing list