diff options
author | wm4 <wm4@nowhere> | 2020-02-28 21:17:55 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-29 01:23:20 +0100 |
commit | b0b5de306387f03f7f79a34ecc7d2aaf223f180a (patch) | |
tree | 40fa6a05b16e4e79829e0acc6434edf8100f046e /player/playloop.c | |
parent | a8f4ca587dba1c1579e20b3361196c78babab7fa (diff) | |
download | mpv-b0b5de306387f03f7f79a34ecc7d2aaf223f180a.tar.bz2 mpv-b0b5de306387f03f7f79a34ecc7d2aaf223f180a.tar.xz |
f_decoder_wrapper: replace most public fields with setters/getters
I may (optionally) move decoding to a separate thread in a future
change. It's a bit attractive to move the entire decoder wrapper to
there, so if the demuxer has a new packet, it doesn't have to wake up
the main thread, and can directly wake up the decoder. (Although that's
bullshit, since there's a queue in between, and libavcodec's
multi-threaded decoding plays cross-threads ping pong with packets
anyway. On the other hand, the main thread would still have to shuffle
the packets around, so whatever, just seems like better design.)
As preparation, there shouldn't be any mutable state exposed by the
wrapper. But there's still a large number of corner-caseish crap, so
just use setters/getters for them. This recorder thing will inherently
not work, so it'll have to be disabled if threads are used.
This is a bit painful, but probably still the right thing. Like
speculatively pulling teeth.
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/playloop.c b/player/playloop.c index c8c74edb64..9660a5b6ad 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -229,7 +229,7 @@ void reset_playback_state(struct MPContext *mpctx) struct track *t = mpctx->tracks[n]; // (Often, but not always, this is redundant and also done elsewhere.) if (t->dec) - t->dec->play_dir = mpctx->play_dir; + mp_decoder_wrapper_set_play_dir(t->dec, mpctx->play_dir); if (t->d_sub) sub_set_play_dir(t->d_sub, mpctx->play_dir); } |