aboutsummaryrefslogtreecommitdiffhomepage
path: root/filters
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2018-02-03 13:23:07 +0100
committerGravatar Kevin Mitchell <kevmitch@gmail.com>2018-02-03 05:01:34 -0800
commitd7db42d27f0a474a0ef0de8a771d3e4d5344e3ed (patch)
tree939b4d8cb496e4a4a3d5bba02fadaa682f81d9e8 /filters
parent3d4071e6e5b4a536391cd8cfe54ddf2e2f7f915d (diff)
swresample: minor simplification
Cosmetic and no change in behavior. At least I think this looks simpler.
Diffstat (limited to 'filters')
-rw-r--r--filters/f_swresample.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/filters/f_swresample.c b/filters/f_swresample.c
index 2bb1e4cd02..49f69cbbd7 100644
--- a/filters/f_swresample.c
+++ b/filters/f_swresample.c
@@ -666,15 +666,14 @@ static void process(struct mp_filter *f)
struct mp_frame out = filter_resample_output(p, p->input);
- if (p->input && out.type) {
+ if (out.type) {
mp_pin_in_write(f->ppins[1], out);
- } 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 {
+ if (!p->input)
+ mp_pin_out_repeat_eof(f->ppins[0]);
+ } else if (p->input) {
mp_filter_internal_mark_progress(f); // try to consume more input
+ } else {
+ mp_pin_in_write(f->ppins[1], MP_EOF_FRAME);
}
if (p->input && !mp_aframe_get_size(p->input))