[FFmpeg-devel] [PATCH]Support PCM in DVD-Audio files

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Dec 11 11:29:34 CET 2013


Michael Niedermayer <michaelni <at> gmx.at> writes:

> > +        switch (avio_r8(s->pb)) {
> > +        case 0:
> > +            st->codec->channels = 1;
> > +            st->codec->channel_layout = AV_CH_LAYOUT_MONO;
> > +            break;
> > +        case 1:
> > +            st->codec->channels = 2;
> > +            st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
> > +            break;
> 
> you cannot change channels, bps, ... on a per packet level from the
> demuxer this way, as the decoder can be run in a seperate thread
> and could be decoding a random past packet which still uses the past
> count of channels.

Would it be ok to check that these values have not changed?

> it might be easiest to put this in a decoder in libavcodec

How can I use the value of lpcm_header_len in the decoder?

Thank you, Carl Eugen



More information about the ffmpeg-devel mailing list