diff options
author | wm4 <wm4@nowhere> | 2015-05-11 17:38:35 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-05-11 17:38:35 +0200 |
commit | 4858c47e1c6ea51bad409fa8ee56aeb05a7a3778 (patch) | |
tree | c939f9371122633365895b9f78fbf854a36ca5b6 /libmpv | |
parent | a5aa58c63c6f0b1ee43d8ac90e0ae0dd57de194a (diff) | |
download | mpv-4858c47e1c6ea51bad409fa8ee56aeb05a7a3778.tar.bz2 mpv-4858c47e1c6ea51bad409fa8ee56aeb05a7a3778.tar.xz |
Always block SIGPIPE globally
OpenSSL and GnuTLS are still causing this problem (although FFmpeg could
be blamed as well - but not really). In particular, it was happening to
libmpv users and in cases the pseudo-gui profile is used. This was
because all signal handling is in the terminal code, so if terminal is
disabled, it won't be set. This was obviously a questionable shortcut.
Avoid further problems by always blocking the signal. This is done even
for libmpv, despite our policy of not messing with global state.
Explicitly document this in the libmpv docs. It turns out that a version
bump to 1.17 was forgotten for the addition of MPV_FORMAT_BYTE_ARRAY, so
document that change as part of 1.16.
Diffstat (limited to 'libmpv')
-rw-r--r-- | libmpv/client.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libmpv/client.h b/libmpv/client.h index 5a7a54ad67..8958865c79 100644 --- a/libmpv/client.h +++ b/libmpv/client.h @@ -118,8 +118,10 @@ extern "C" { * (used through libass), ALSA, FFmpeg, and possibly more. * - The FPU precision must be set at least to double precision. * - On Windows, mpv will call timeBeginPeriod(1). - * - SIGPIPE should be blocked. Some parts rely on this signal not crashing the - * process (such as ffmpeg OpenSSL support, or the mpv IPC code). + * - On UNIX, every mpv_initialize() call will block SIGPIPE. This is done + * because FFmpeg makes unsafe use of OpenSSL and GnuTLS, which can raise + * this signal under certain circumstances. Once these libraries (or FFmpeg) + * are fixed, libmpv will not block the signal anymore. * - On memory exhaustion, mpv will kill the process. * * Encoding of filenames @@ -196,7 +198,7 @@ extern "C" { * relational operators (<, >, <=, >=). */ #define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL) -#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 16) +#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 17) /** * Return the MPV_CLIENT_API_VERSION the mpv source has been compiled with. |