On 18/04/14 13:00, wm4 wrote: > On Fri, 18 Apr 2014 11:17:55 +0200 > Luca Barbato <[email protected]> wrote: > >> --- >> >> - changed the return value of convert_frame >> - added open2 >> - documented config (open3?) >> >> How to use the new api (will be put somewhere else >> >> AVAudioResampleContext *avr = avresample_alloc(); >> AVFrame *out = av_frame_alloc(); >> AVFrame *in; >> >> while (fill_input(in)) { >> ret = avresample_convert_frame(avr, out, in); >> do_stuff(out); >> } >> >> ret = avresample_convert_frame(avr, out, NULL); >> >> do_stuff(out); > > The example should consider format changes as well, because most users > are going to use this to convert decoder output into a known format.
I guess I can write more than one. I'll update the wiki with them. > Why? Users of avresample_open() can use the AVOptions API on avr, and > don't need this. Consistence mostly. > Still doesn't specify rounding... Probably this could receive a patch on the current doc as well, Justin? > So avresample_open2() has to randomly change semantics as we add more > stuff to AVFrame that can influence resampler options? Not really, if that would be the case avresample_config will be changed to remain consistent. > I'd say always return, since the caller has to deal with format changes > anyway. Seems that there is consensus there so I'd remove the comment. lu _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
