diff options
author | wm4 <wm4@nowhere> | 2019-10-31 11:24:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-10-31 11:24:20 +0100 |
commit | 6d92e5550203b04b7254eb8ffe31734e57070d79 (patch) | |
tree | fcd9f88cddae110a8a65f9e7ea59703bd79f83c5 /sub/osd_libass.c | |
parent | 6fdfa7c9912ff9fda0ada6125bc4fed61b7220ea (diff) | |
download | mpv-6d92e5550203b04b7254eb8ffe31734e57070d79.tar.bz2 mpv-6d92e5550203b04b7254eb8ffe31734e57070d79.tar.xz |
Replace uses of FFMIN/MAX with MPMIN/MAX
And remove libavutil includes where possible.
Diffstat (limited to 'sub/osd_libass.c')
-rw-r--r-- | sub/osd_libass.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sub/osd_libass.c b/sub/osd_libass.c index e51b7f4048..d5f7bb82bf 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -15,13 +15,12 @@ * License along with mpv. If not, see <http://www.gnu.org/licenses/>. */ +#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> -#include <libavutil/common.h> - #include "config.h" #include "mpv_talloc.h" @@ -288,7 +287,7 @@ struct ass_draw { static void ass_draw_start(struct ass_draw *d) { - d->scale = FFMAX(d->scale, 1); + d->scale = MPMAX(d->scale, 1); d->text = talloc_asprintf_append(d->text, "{\\p%d}", d->scale); } @@ -368,9 +367,9 @@ static void get_osd_bar_box(struct osd_state *osd, struct osd_object *obj, float base_size = 0.03125; style->Outline *= *o_h / track->PlayResY / base_size; // So that the chapter marks have space between them - style->Outline = FFMIN(style->Outline, *o_h / 5.2); + style->Outline = MPMIN(style->Outline, *o_h / 5.2); // So that the border is not 0 - style->Outline = FFMAX(style->Outline, *o_h / 32.0); + style->Outline = MPMAX(style->Outline, *o_h / 32.0); // Rendering with shadow is broken (because there's more than one shape) style->Shadow = 0; |