swresample: remove unnecessary request for new input

We called mp_pin_out_request_data() if there was input _and_ output.
This is not how it should be: we should request new input only if output
was requested, but we could not produce any output.

On the other hand, the upper half of the process() function will request
new input if output is required, but all input was consumed. But this
requires calling mp_filter_internal_mark_progress(), as otherwise the
general filter logic would not know that we can continue.
This commit is contained in:
wm4 2018-02-03 13:13:49 +01:00 committed by Kevin Mitchell
parent 87d8f292f5
commit 3d4071e6e5
No known key found for this signature in database
GPG Key ID: 559A34B46A917232
1 changed files with 2 additions and 1 deletions

View File

@ -668,12 +668,13 @@ static void process(struct mp_filter *f)
if (p->input && out.type) {
mp_pin_in_write(f->ppins[1], out);
mp_pin_out_request_data(f->ppins[0]);
} else if (!p->input && out.type) {
mp_pin_in_write(f->ppins[1], out);
mp_pin_out_repeat_eof(f->ppins[0]);
} else if (!p->input) {
mp_pin_in_write(f->ppins[1], MP_EOF_FRAME);
} else {
mp_filter_internal_mark_progress(f); // try to consume more input
}
if (p->input && !mp_aframe_get_size(p->input))