[FFmpeg-cvslog] r14712 - trunk/libavcodec/pcm.c

Måns Rullgård mans
Tue Aug 12 14:40:44 CEST 2008


pross wrote:
> Author: pross
> Date: Tue Aug 12 14:32:40 2008
> New Revision: 14712
>
> Log:
> Fix CODEC_ID_PCM_U8 decoder output size calculation to support odd-number of
> samples.
>
>
> Modified:
>    trunk/libavcodec/pcm.c
>
> Modified: trunk/libavcodec/pcm.c
> ==============================================================================
> --- trunk/libavcodec/pcm.c	(original)
> +++ trunk/libavcodec/pcm.c	Tue Aug 12 14:32:40 2008
> @@ -411,7 +411,7 @@ static int pcm_decode_frame(AVCodecConte
>      case CODEC_ID_PCM_U8:
>          memcpy(samples, src, n);
>          src += n;
> -        samples += n/2;
> +        samples = (short*)((uint8_t*)data + n);

I hope this won't do anything nasty with alignment.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-cvslog mailing list