mirror of https://github.com/mpv-player/mpv
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:
parent
87d8f292f5
commit
3d4071e6e5
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue