summaryrefslogtreecommitdiffstats
path: root/filters/f_output_chain.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-29 06:18:33 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-30 03:10:27 -0800
commit76e7e78ce989aad546310b9808cf7f96f23a281f (patch)
treee4432df6f925d2a1f9e5022373d359b626d9ea09 /filters/f_output_chain.c
parent054c02ad64a62dd8393bde0fd73edeaa71048722 (diff)
downloadmpv-76e7e78ce989aad546310b9808cf7f96f23a281f.tar.bz2
mpv-76e7e78ce989aad546310b9808cf7f96f23a281f.tar.xz
audio: move to decoder wrapper
Use the decoder wrapper that was introduced for video. This removes all code duplication the old audio decoder wrapper had with the video code. (The audio wrapper was copy pasted from the video one over a decade ago, and has been kept in sync ever since by the power of copy&paste. Since the original copy&paste was possibly done by someone who did not answer to the LGPL relicensing, this should also remove all doubts about whether any of this code is left, since we now completely remove any code that could possibly have been based on it.) There is some complication with spdif handling, and a minor behavior change (it will restrict the list of codecs to spdif if spdif is to be used), but there should not be any difference in practice.
Diffstat (limited to 'filters/f_output_chain.c')
-rw-r--r--filters/f_output_chain.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/filters/f_output_chain.c b/filters/f_output_chain.c
index e53f9eafaa..ea6a0a3981 100644
--- a/filters/f_output_chain.c
+++ b/filters/f_output_chain.c
@@ -452,8 +452,13 @@ void mp_output_chain_reset_harder(struct mp_output_chain *c)
mp_filter_reset(p->f);
p->public.failed_output_conversion = false;
- for (int n = 0; n < p->num_all_filters; n++)
- p->all_filters[n]->failed = false;
+ for (int n = 0; n < p->num_all_filters; n++) {
+ struct mp_user_filter *u = p->all_filters[n];
+
+ u->failed = false;
+ u->last_out_params = (struct mp_image_params){0};
+ mp_aframe_reset(u->last_out_aformat);
+ }
}
static void destroy(struct mp_filter *f)