[FFmpeg-devel] [PATCH] MLP/TrueHD decoder
Ian Caulfield
ian.caulfield
Thu Nov 8 15:06:57 CET 2007
On Nov 8, 2007 1:33 PM, Ian Caulfield <ian.caulfield at gmail.com> wrote:
> > [...]
> > > + if (m->max_channel[substr] >= MAX_CHANNELS
> > > + || m->max_matrix_channel[substr] >= MAX_CHANNELS)
> > > + {
> > > + if (substr > 0) {
> >
> > > + av_log(m->avctx, AV_LOG_INFO,
> > > + "Substream %d contains more channels than the maximum "
> > > + "supported by this decoder (%d). Only substreams up to %d "
> > > + "will be decoded. Please provide a sample of this file "
> > > + "to the FFmpeg development list.\n",
> > > + substr, MAX_CHANNELS, substr - 1);
> > > + m->max_decoded_substream = substr - 1;
> > > + m->avctx->channels = m->max_channel[substr - 1] + 1;
> > > + } else {
> >
> > > + av_log(m->avctx, AV_LOG_INFO,
> > > + "This stream contains more channels than the maximum "
> > > + "supported by this decoder (%d). Please provide a sample "
> > > + "of this file to the FFmpeg development list.\n",
> > > + MAX_CHANNELS);
> > > + return -1;
> > > + }
> > > + }
> >
> > so after this max_channel and max_matrix_channel are invalid, is there
> > anything that stops them from being used? if no then this
> > check is as good as no check at all
>
> The first case sets max_decoded_substream so that these parameters
> won't be used, while the second case returns an error - however I seem
> to have missed resetting the in_sync variable. Will fix.
Actually, any error raised by that function causes in_sync to be reset
by the calling function, so it should be OK...
Ian
More information about the ffmpeg-devel
mailing list