[FFmpeg-devel] [patch] 6 channel raw audio input resultsin invalid PCM packet error

Phil Rutschman philr
Fri Nov 7 23:02:18 CET 2008


> Content-Description: raw_audio_6_channels.diff
> > Index: libavformat/raw.c
> > ===================================================================
> > --- libavformat/raw.c	(revision 15760)
> > +++ libavformat/raw.c	(working copy)
> > @@ -138,11 +138,17 @@
> >
> >  static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)  {
> > -    int ret, size, bps;
> > -    //    AVStream *st = s->streams[0];
> > +    int ret, size, bps, sample_size;
> > +    AVStream *st = s->streams[0];
> >
> >      size= RAW_PACKET_SIZE;
> 
> if(channels>0 && channels<20)
>     size *= channels;
> 
> seems like a simpler solution

I believe that would fail for 1-channel 24-bit audio since 3 doesn't
divide evenly into 1024*1.




More information about the ffmpeg-devel mailing list