video_player_mpv: log if mpv_render_context_create fails

This commit is contained in:
2024-02-21 11:41:06 +00:00
parent 4eb59ce8c2
commit 5b0a151cb2

View File

@@ -293,7 +293,10 @@ static void vpm_video_player_mpv_init(VpmVideoPlayerMpv *widget) {
{MPV_RENDER_PARAM_ADVANCED_CONTROL, &(int){0}},
{0}};
mpv_render_context_create(&mpv_ctx->render_context, mpv_ctx->handle, params);
int err = mpv_render_context_create(&mpv_ctx->render_context, mpv_ctx->handle, params);
if (err) {
fprintf(stderr, "Error getting creating mpv context: %d\n", err);
}
mpv_set_wakeup_callback(mpv_ctx->handle, mpv_update_callback, widget);
mpv_render_context_set_update_callback(mpv_ctx->render_context,