summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-05-31 17:34:12 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:05 +0200
commite86a0df52e6cead69f89064a13fc9eb3358b80a5 (patch)
tree6dfc8d2abef938cb8fda0f8e52b862fd99062176
parent0c5df2965ee2406b5440d063c6e6e3c6b88c6e72 (diff)
downloadmpv-e86a0df52e6cead69f89064a13fc9eb3358b80a5.tar.bz2
mpv-e86a0df52e6cead69f89064a13fc9eb3358b80a5.tar.xz
f_decoder_wrapper: move option update to a common entrypoint
process() calls these functions. It's a much better place to potentially copy changed option values into the cache struct.
-rw-r--r--filters/f_decoder_wrapper.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/filters/f_decoder_wrapper.c b/filters/f_decoder_wrapper.c
index a494d589c4..f0106bb558 100644
--- a/filters/f_decoder_wrapper.c
+++ b/filters/f_decoder_wrapper.c
@@ -177,7 +177,6 @@ bool mp_decoder_wrapper_reinit(struct mp_decoder_wrapper *d)
{
struct priv *p = d->f->priv;
struct MPOpts *opts = p->opt_cache->opts;
- m_config_cache_update(p->opt_cache);
if (p->decoder)
talloc_free(p->decoder->f);
@@ -254,7 +253,6 @@ static void fix_image_params(struct priv *p,
struct mp_image_params m = *params;
struct mp_codec_params *c = p->codec;
struct MPOpts *opts = p->opt_cache->opts;
- m_config_cache_update(p->opt_cache);
MP_VERBOSE(p, "Decoder format: %s\n", mp_image_params_to_str(params));
p->dec_format = *params;
@@ -319,7 +317,6 @@ static void fix_image_params(struct priv *p,
static void process_video_frame(struct priv *p, struct mp_image *mpi)
{
struct MPOpts *opts = p->opt_cache->opts;
- m_config_cache_update(p->opt_cache);
int dir = p->public.play_dir;
@@ -732,6 +729,7 @@ static void read_frame(struct priv *p)
static void process(struct mp_filter *f)
{
struct priv *p = f->priv;
+ m_config_cache_update(p->opt_cache);
feed_packet(p);
read_frame(p);