On 16/04/14 15:53, Justin Ruggles wrote:
>> +    if (out && !out->linesize[0]) {
>> > +        out->nb_samples = output_frame_samples(avr, out, in);
>> > +        if ((ret = av_frame_get_buffer(out, 0)) < 0) {
>> > +            avresample_close(avr);
> why close on get_buffer() failure? maybe keep track if it was opened in
> this function and only close it in that case.

Can be done, making close and open idempotent might be useful.

I'm not sure regarding the return value

On a side 0 vs < 0 is more common and people not expecting
reconfigurations would not risk botching with a < 0 check and then be
merry even if the function needs reconfiguration.

On the other if you have to reconfigure checking for > 0 is simpler to
handle.

I'll update the patch soon.

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

Reply via email to