summaryrefslogtreecommitdiffstats
path: root/filters/f_swresample.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-02-03 13:13:49 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-03 05:01:34 -0800
commit3d4071e6e5b4a536391cd8cfe54ddf2e2f7f915d (patch)
tree08a64e104df402288a6f021bc3722925f2c6b606 /filters/f_swresample.c
parent87d8f292f51621a5ad76bd7acebd232b5e6aefce (diff)
downloadmpv-3d4071e6e5b4a536391cd8cfe54ddf2e2f7f915d.tar.bz2
mpv-3d4071e6e5b4a536391cd8cfe54ddf2e2f7f915d.tar.xz
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.
Diffstat (limited to 'filters/f_swresample.c')
-rw-r--r--filters/f_swresample.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/filters/f_swresample.c b/filters/f_swresample.c
index 39efe173bf..2bb1e4cd02 100644
--- a/filters/f_swresample.c
+++ b/filters/f_swresample.c
@@ -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))