diff options
author | wm4 <wm4@nowhere> | 2020-03-18 22:45:59 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-03-18 22:45:59 +0100 |
commit | 0b9ed9c2744ada1eefc1f254c5f3ade6c626ed72 (patch) | |
tree | 3085f56bafaaf9acc1dad20e8ea44d5e7071d475 /player | |
parent | cb82cbbbae99d5b8beebae76320a9097a2bc34f7 (diff) | |
download | mpv-0b9ed9c2744ada1eefc1f254c5f3ade6c626ed72.tar.bz2 mpv-0b9ed9c2744ada1eefc1f254c5f3ade6c626ed72.tar.xz |
build: make libass non-optional
Using mpv without libass isn't really supported, since it's not only
used to display ASS subtitles, but all text subtitles, and even OSD.
At least 1 user complained that the player printed a warning if built
without libass. Avoid trying to create the impression that using this
software without libass is in any way supported or desirable, and make
it fully mandatory.
(As far as making dependencies optional goes, I'd rather make ffmpeg
optional, which is an oversized and bloated library, rather than
something tiny like libass.)
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 9 | ||||
-rw-r--r-- | player/main.c | 5 |
2 files changed, 1 insertions, 13 deletions
diff --git a/player/command.c b/player/command.c index d894f28f89..73c6d86712 100644 --- a/player/command.c +++ b/player/command.c @@ -27,6 +27,7 @@ #include <pthread.h> #include <sys/types.h> +#include <ass/ass.h> #include <libavutil/avstring.h> #include <libavutil/common.h> @@ -75,10 +76,6 @@ #include <windows.h> #endif -#if HAVE_LIBASS -#include <ass/ass.h> -#endif - struct command_ctx { // All properties, terminated with a {0} item. struct m_property *properties; @@ -3012,11 +3009,7 @@ static int mp_property_ffmpeg(void *ctx, struct m_property *prop, static int mp_property_libass_version(void *ctx, struct m_property *prop, int action, void *arg) { -#if HAVE_LIBASS return m_property_int64_ro(action, arg, ass_library_version()); -#else - return M_PROPERTY_UNAVAILABLE; -#endif } static int mp_property_alias(void *ctx, struct m_property *prop, diff --git a/player/main.c b/player/main.c index 3d38be4f43..f42d181806 100644 --- a/player/main.c +++ b/player/main.c @@ -402,11 +402,6 @@ int mp_initialize(struct MPContext *mpctx, char **options) mp_input_enable_section(mpctx->input, "encode", MP_INPUT_EXCLUSIVE); } -#if !HAVE_LIBASS - MP_WARN(mpctx, "Compiled without libass.\n"); - MP_WARN(mpctx, "There will be no OSD and no text subtitles.\n"); -#endif - mp_load_scripts(mpctx); if (opts->force_vo == 2 && handle_force_window(mpctx, false) < 0) |