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

pross at xvid.org pross
Tue Aug 12 15:16:48 CEST 2008


On Tue, Aug 12, 2008 at 01:40:44PM +0100, M?ns Rullg?rd wrote:
> 
> 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.

Nup. 'samples' is used in this context soley to calculate the number
of bytes returned by the PCM decoder. I intend to replace short* samples
with uint8_t* in a later patch.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20080812/a74e4061/attachment.pgp>



More information about the ffmpeg-cvslog mailing list