From 397705b12ca07984090a5bfc189b5dba8e5c6f39 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 14 Jan 2017 17:41:04 +0100 Subject: manpage: define stricter rules for C plugin return values Just in case. --- DOCS/man/libmpv.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'DOCS') 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), -- cgit v1.2.3