[FFmpeg-devel] [patch] 24bit lpcm in mpeg (vob)

Diego Biurrun diego
Sat Apr 12 19:20:14 CEST 2008


On Sat, Apr 12, 2008 at 05:19:24PM +0200, Lars T?uber wrote:
> 
> On Sat, 12 Apr 2008 16:58:53 +0200 Diego Biurrun <diego at biurrun.de> wrote:
> > > --- ffmpeg/libavcodec/pcm.c	2008-03-21 13:17:05.000000000 +0100
> > > +++ ffmpeg.1/libavcodec/pcm.c	2008-04-12 14:08:37.000000000 +0200
> > > @@ -434,6 +434,19 @@ static int pcm_decode_frame(AVCodecConte
> > > +    case CODEC_ID_PCM_S24DVD:
> > > +        n = buf_size / 12;
> > > +        for(;n>0;n--) {
> > > +          *samples++ = bytestream_get_be16(&src);
> > > +          *samples++ = bytestream_get_be16(&src);
> > > +          *samples++ = bytestream_get_be16(&src);
> > > +          *samples++ = bytestream_get_be16(&src);
> > > +          src+=4;       /**
> > > +                          ignore the least significant bytes of each sample,
> > > +                          because we only support 16bit audio right now
> > > +                        */
> > 
> > This comment looks weird to me.  Why not put it above the line?
> 
> Changed to: 
> +          *samples++ = bytestream_get_be16(&src);
> +          /* ignore the least significant bytes of each sample,
> +             because we only support 16bit audio right now 
> +           */
> +          src+=4;

Well, now you have a weird line with just "*/" on it in there :)  Just
put it on the end of the previous line.  Don't bother sending in an
updated patch just yet, I'm sure Michael and the others will have
further comments.

Diego




More information about the ffmpeg-devel mailing list