summaryrefslogtreecommitdiffstats
path: root/filters/f_output_chain.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-02-21 15:43:24 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-21 22:35:24 -0800
commit4527409c8d968564de53e4dcf4021ff3ae2843b5 (patch)
tree492832282a86e6a17a56fb7351cf2aef025db60b /filters/f_output_chain.c
parent7f714c6984b3ca0ee49a76cbb46fbeb520519401 (diff)
downloadmpv-4527409c8d968564de53e4dcf4021ff3ae2843b5.tar.bz2
mpv-4527409c8d968564de53e4dcf4021ff3ae2843b5.tar.xz
audio: improve behavior if filters output nothing during probing
Just bail out immediately (and disable audio) if format probing has no result, instead of doing nothing and then apparently freezing. This can happen with bogus filters, cases where the first audio frame is essentially dropped by filters (can happen with large resampling factors), and if the audio track contains no packets at all, or all packets fail to decode.
Diffstat (limited to 'filters/f_output_chain.c')
-rw-r--r--filters/f_output_chain.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/filters/f_output_chain.c b/filters/f_output_chain.c
index 799f29989d..1f74a01661 100644
--- a/filters/f_output_chain.c
+++ b/filters/f_output_chain.c
@@ -351,7 +351,10 @@ static void process_format_change(struct mp_filter *f)
p->format_change_phase = 2;
mp_pin_out_request_data(p->filters_out);
} else if (!p->public.failed_output_conversion) {
- MP_ERR(p, "we didn't get an output frame? (broken filter?)\n");
+ MP_ERR(p, "No output format - empty file or broken filter?\n");
+ p->ao = NULL;
+ p->public.ao_needs_update = true;
+ p->format_change_phase = 5;
}
mp_filter_internal_mark_progress(f);
return;