From 65db3291b327797ac7d09ba2ea36db9ba5383f18 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 28 Oct 2014 16:19:07 +0100 Subject: client API: better error reporting Give somewhat more information on playback failure. --- player/video.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index db33406d63..7e4de2482f 100644 --- a/player/video.c +++ b/player/video.c @@ -273,6 +273,7 @@ int reinit_video_chain(struct MPContext *mpctx) if (!mpctx->video_out) { MP_FATAL(mpctx, "Error opening/initializing " "the selected video_out (-vo) device.\n"); + mpctx->error_playing = MPV_ERROR_VO_INIT_FAILED; goto err_out; } mpctx->mouse_cursor_visible = true; @@ -766,8 +767,10 @@ void write_video(struct MPContext *mpctx, double endpts) MP_VERBOSE(mpctx, "VO: Description: %s\n", info->description); int vo_r = vo_reconfig(vo, &p, 0); - if (vo_r < 0) + if (vo_r < 0) { + mpctx->error_playing = MPV_ERROR_VO_INIT_FAILED; goto error; + } init_vo(mpctx); mpctx->time_frame = 0; // display immediately } -- cgit v1.2.3