summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-20 21:35:45 +0200
committerwm4 <wm4@nowhere>2014-08-20 21:35:45 +0200
commit7758c15e95c1cc4b16ca309e0760e51aad423b29 (patch)
tree0f132495d9a9e4fe20f333986f74a0e9c0223965 /player/video.c
parent09897bed7f6905427dd35196b3c17aa7d3d066ab (diff)
downloadmpv-7758c15e95c1cc4b16ca309e0760e51aad423b29.tar.bz2
mpv-7758c15e95c1cc4b16ca309e0760e51aad423b29.tar.xz
video: don't assume query_format is thread-safe
Although it's probably safe for most VOs, there's no guarantee.
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/player/video.c b/player/video.c
index ffe24e621c..fd998014d5 100644
--- a/player/video.c
+++ b/player/video.c
@@ -91,10 +91,8 @@ void update_fps(struct MPContext *mpctx)
static void set_allowed_vo_formats(struct vf_chain *c, struct vo *vo)
{
- for (int fmt = IMGFMT_START; fmt < IMGFMT_END; fmt++) {
- c->allowed_output_formats[fmt - IMGFMT_START] =
- vo->driver->query_format(vo, fmt);
- }
+ for (int fmt = IMGFMT_START; fmt < IMGFMT_END; fmt++)
+ c->allowed_output_formats[fmt - IMGFMT_START] = vo_query_format(vo, fmt);
}
static int try_filter(struct MPContext *mpctx, struct mp_image_params params,
@@ -575,7 +573,6 @@ static int update_video(struct MPContext *mpctx, double endpts)
}
- //bool vo_framedrop = !!mpctx->video_out->driver->flip_page_timed;
bool vo_framedrop = !!(mpctx->opts->frame_dropping & 1);
int min_frames = vo_framedrop ? 2 : 1; // framedrop needs duration