mirror of https://github.com/mpv-player/mpv
437a46d443
When the player core requests new frames from the filter, this is called external/recursive filtering, which acts slightly differently from when filters request new data internally. Mainly this is so the external user doesn't have to call mp_filter_graph_run() just to get a frame. This causes a number of complications, and the short version is that until now, mp_filter_graph_run() has unnecessarily returned true in the current common case, which made the playloop run too often for no reason. The problem is that when a mp_pin is read externally, updating the same mp_pin during recursive filtering flagged external_pending when the result was written, which made mp_filter_graph_run() return true, which made the playloop call mp_filter_graph_run() again. This is redundant because the caller is obviously checking the new state of the mp_pin immediately. The only situation in which external_pending really must be set is if _another_ pin is changed. In theory, we could also unset it if the set of "external" pins that are not in a signaled state becomes empty, but we don't track that in a convenient way. This commit removes the redundant signaling, and avoids running the playloop an additional time for each video and audio frame (as it actually was planned from the beginning, but duh). |
||
---|---|---|
.. | ||
f_async_queue.c | ||
f_async_queue.h | ||
f_auto_filters.c | ||
f_auto_filters.h | ||
f_autoconvert.c | ||
f_autoconvert.h | ||
f_decoder_wrapper.c | ||
f_decoder_wrapper.h | ||
f_demux_in.c | ||
f_demux_in.h | ||
f_hwtransfer.c | ||
f_hwtransfer.h | ||
f_lavfi.c | ||
f_lavfi.h | ||
f_output_chain.c | ||
f_output_chain.h | ||
f_swresample.c | ||
f_swresample.h | ||
f_swscale.c | ||
f_swscale.h | ||
f_utils.c | ||
f_utils.h | ||
filter.c | ||
filter.h | ||
filter_internal.h | ||
frame.c | ||
frame.h | ||
user_filters.c | ||
user_filters.h |