New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(libmpv) mpv_set_property_string returns an error but still works when used before mpv_initialize #3988

Closed
gunnarmarten opened this Issue Jan 4, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@gunnarmarten

gunnarmarten commented Jan 4, 2017

mpv version and platform

mpv HEAD-43386a7
ffmpeg 3.2.2
OSX 10.11.6

Reproduction steps

I'm using libmpv with opengl-cb in my opengl application. I recently updated to the newest API changes and changed the mpv_set_option_string to mpv_set_property_string for all my options. Some of them are set before the mpv_initialize. Like enabling the config option and set a config_dir. I had a check for the return code and after updating the code it always returned an error although the config_dir is actually set.

To reproduce:
Use the sdl example from https://github.com/mpv-player/mpv-examples.git

add

int rc = mpv_set_property_string(mpv, "config", "yes");
printf("rc %s\n", mpv_error_string(rc));

just before the mpv_initialize call.

Build and run.

Expected behavior

Should set the property and return success

Actual behavior

returns error code -11 which is "error accessing property"

Log file

none

Sample files

any file

@wm4 wm4 closed this in f34faca Jan 4, 2017

@wm4

This comment has been minimized.

Contributor

wm4 commented Jan 4, 2017

The return value was incorrect, should work now.

@gunnarmarten

This comment has been minimized.

gunnarmarten commented Jan 4, 2017

cool yes works now. Thanks for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment