summaryrefslogtreecommitdiffstats
path: root/player/osd.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-28 21:17:55 +0100
committerwm4 <wm4@nowhere>2020-02-29 01:23:20 +0100
commitb0b5de306387f03f7f79a34ecc7d2aaf223f180a (patch)
tree40fa6a05b16e4e79829e0acc6434edf8100f046e /player/osd.c
parenta8f4ca587dba1c1579e20b3361196c78babab7fa (diff)
downloadmpv-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/osd.c')
-rw-r--r--player/osd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/osd.c b/player/osd.c
index ff9bd9b429..0e8fd2a0e7 100644
--- a/player/osd.c
+++ b/player/osd.c
@@ -220,7 +220,8 @@ static char *get_term_status_msg(struct MPContext *mpctx)
int64_t c = vo_get_drop_count(mpctx->video_out);
struct mp_decoder_wrapper *dec = mpctx->vo_chain->track
? mpctx->vo_chain->track->dec : NULL;
- int dropped_frames = dec ? dec->dropped_frames : 0;
+ int dropped_frames =
+ dec ? mp_decoder_wrapper_get_frames_dropped(dec) : 0;
if (c > 0 || dropped_frames > 0) {
saddf(&line, " Dropped: %"PRId64, c);
if (dropped_frames)