On Tue, 24 May 2011 08:04:36 -0400, "Ronald S. Bultje" <[email protected]> 
wrote:
> Hi,
> 
> On Tue, May 24, 2011 at 1:35 AM, Anton Khirnov <[email protected]> wrote:
> > ---
> >  libavdevice/oss_audio.c |   24 ++++++++++++++++++++----
> >  1 files changed, 20 insertions(+), 4 deletions(-)
> [..]
> > -    if (ap->sample_rate <= 0 || ap->channels <= 0)
> > -        return -1;
> > +    if (ap->sample_rate > 0)
> > +        s->sample_rate = ap->sample_rate;
> > +    if (ap->channels > 0)
> > +        s->channels = ap->channels;
> >
> >     st = av_new_stream(s1, 0);
> >     if (!st) {
> >         return AVERROR(ENOMEM);
> >     }
> > -    s->sample_rate = ap->sample_rate;
> > -    s->channels = ap->channels;
> 
> Doesn't this get rid of proper error reporting if a user set no
> channels/samplerate using commandline parameters?

Yes, because there are defaults now.

> Also, the private
> options always override AVCodecContext options, right?

Those are demuxer private option, not decoder. AVCodecContext has nothing
to do with this.

--
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to