client API: fix mpv_set_property() return value before init

Did not return success as success.

Fixes #3988.
This commit is contained in:
wm4 2017-01-04 15:08:41 +01:00
parent 43386a7c92
commit f34faca910
1 changed files with 1 additions and 0 deletions

View File

@ -1088,6 +1088,7 @@ int mpv_set_property(mpv_handle *ctx, const char *name, mpv_format format,
mp_get_property_id(ctx->mpctx, name) >= 0)
return MPV_ERROR_PROPERTY_UNAVAILABLE;
switch (r) {
case MPV_ERROR_SUCCESS: return MPV_ERROR_SUCCESS;
case MPV_ERROR_OPTION_FORMAT: return MPV_ERROR_PROPERTY_FORMAT;
case MPV_ERROR_OPTION_NOT_FOUND: return MPV_ERROR_PROPERTY_NOT_FOUND;
default: return MPV_ERROR_PROPERTY_ERROR;