aboutsummaryrefslogtreecommitdiffhomepage
path: root/DOCS
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2017-01-14 17:41:04 +0100
committerGravatar wm4 <wm4@nowhere>2017-01-14 17:41:04 +0100
commit397705b12ca07984090a5bfc189b5dba8e5c6f39 (patch)
tree5b26006d444a2f4c97465181cf66a465f379a3da /DOCS
parente91331e683f4e66d9945d89e54a25b3b9610116d (diff)
manpage: define stricter rules for C plugin return values
Just in case.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/libmpv.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/DOCS/man/libmpv.rst b/DOCS/man/libmpv.rst
index 6a9c2e52a5..909a2bb447 100644
--- a/DOCS/man/libmpv.rst
+++ b/DOCS/man/libmpv.rst
@@ -43,8 +43,11 @@ return as long as your plugin is loaded (it runs in its own thread). The
``handle`` will be deallocated as soon as the plugin function returns.
The return value is interpreted as error status. A value of ``0`` is
-interpreted as success, while any other value signals an error. In the latter
-case, the player prints an uninformative error message that loading failed.
+interpreted as success, while ``-1`` signals an error. In the latter case,
+the player prints an uninformative error message that loading failed.
+
+Return values other than ``0`` and ``-1`` are reserved, and trigger undefined
+behavior.
Within the plugin function, you can call libmpv API functions. The ``handle``
is created by ``mpv_create_client()`` (or actually an internal equivalent),