diff options
| author | Michael Forney <mforney@mforney.org> | 2019-10-26 00:48:33 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2019-10-26 00:48:33 -0700 |
| commit | af0ae46f4e8789f0950414f9fa2152353fb42635 (patch) | |
| tree | 1d67792df9b9849cbf7d65614c562520e975e0f6 /pkg/mpv/patch/0003-Use-memset-to-initialize-large-structures.patch | |
| parent | e06fcb803ebee1485724352850a8eec6cdcd2298 (diff) | |
mpv: Update to 0.30.0
Diffstat (limited to 'pkg/mpv/patch/0003-Use-memset-to-initialize-large-structures.patch')
| -rw-r--r-- | pkg/mpv/patch/0003-Use-memset-to-initialize-large-structures.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkg/mpv/patch/0003-Use-memset-to-initialize-large-structures.patch b/pkg/mpv/patch/0003-Use-memset-to-initialize-large-structures.patch new file mode 100644 index 00000000..225f725d --- /dev/null +++ b/pkg/mpv/patch/0003-Use-memset-to-initialize-large-structures.patch @@ -0,0 +1,48 @@ +From 861d233cc210b21f798877fb6b4d4f852ed18b88 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Tue, 2 Jul 2019 17:41:43 -0700 +Subject: [PATCH] Use memset to initialize large structures + +These are over 256 KiB in size. +--- + video/out/gpu/video.c | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c +index 254ee931d2..ad5ce24e28 100644 +--- a/video/out/gpu/video.c ++++ b/video/out/gpu/video.c +@@ -3448,7 +3448,7 @@ static void frame_perf_data(struct pass_info pass[], struct mp_frame_perf *out) + + void gl_video_perfdata(struct gl_video *p, struct voctrl_performance_data *out) + { +- *out = (struct voctrl_performance_data){0}; ++ memset(out, 0, sizeof(*out)); + frame_perf_data(p->pass_fresh, &out->fresh); + frame_perf_data(p->pass_redraw, &out->redraw); + } +@@ -3920,14 +3920,13 @@ struct gl_video *gl_video_init(struct ra *ra, struct mp_log *log, + struct mpv_global *g) + { + struct gl_video *p = talloc_ptrtype(NULL, p); +- *p = (struct gl_video) { +- .ra = ra, +- .global = g, +- .log = log, +- .sc = gl_sc_create(ra, g, log), +- .video_eq = mp_csp_equalizer_create(p, g), +- .opts_cache = m_config_cache_alloc(p, g, &gl_video_conf), +- }; ++ memset(p, 0, sizeof(*p)); ++ p->ra = ra; ++ p->global = g; ++ p->log = log; ++ p->sc = gl_sc_create(ra, g, log); ++ p->video_eq = mp_csp_equalizer_create(p, g); ++ p->opts_cache = m_config_cache_alloc(p, g, &gl_video_conf); + // make sure this variable is initialized to *something* + p->pass = p->pass_fresh; + struct gl_video_opts *opts = p->opts_cache->opts; +-- +2.23.0 + |
