[MPlayer-cvslog] r23994 - trunk/libmpcodecs/ad_ffmpeg.c

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Aug 2 10:37:43 CEST 2007


Hello,
On Thu, Aug 02, 2007 at 02:47:38AM +0300, Uoti Urpala wrote:
> On Thu, 2007-08-02 at 01:36 +0200, reimar wrote:
> > Set lavc_context->channels before opening the codec, it is sufficient to
> > select the desired number of codecs for ffdca and does not break other codecs
> > like ffvorbis that do not (re)set the channel number during decode.
> 
> > +    // Set desired number of channels
> > +    lavc_context->channels = audio_output_channels;
> >      /* open it */
> 
> This overrides the value from the earlier line
> 	lavc_context->channels = sh_audio->wf->nChannels;
> which now becomes meaningless. Is it guaranteed that no codec needs this
> information? If the number of channels IS guaranteed to always be
> available from extradata or whatever and the above line can be removed,
> then what about the other values set in the same block?

Oh crap. I guess I'll send a patch again next time. Honestly, I don't
really know how to handle it, but I think the API is broken.
IMO an extra field should be added to the codec context to contain this
information.
I also think that ffdca is somewhat broken, because if I use e.g. 3 for
channels it just fails to decode instead of just using some other number
of channels it can handle.

Greetings,
Reimar Döffinger



More information about the MPlayer-cvslog mailing list