diff options
author | wm4 <wm4@nowhere> | 2014-10-28 16:19:07 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-28 20:30:12 +0100 |
commit | 65db3291b327797ac7d09ba2ea36db9ba5383f18 (patch) | |
tree | d43c2bb41969472e18c71e7b7275e5cbd2206814 /player/video.c | |
parent | 3cde02fe2292bbc6e213b6a619c2bafa21412276 (diff) | |
download | mpv-65db3291b327797ac7d09ba2ea36db9ba5383f18.tar.bz2 mpv-65db3291b327797ac7d09ba2ea36db9ba5383f18.tar.xz |
client API: better error reporting
Give somewhat more information on playback failure.
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 } |