History

lavif/vf_libplacebo: move code (cosmetic)

To eliminate need for forward declaration

Niklas Haas committed 3 years ago

Commit d8155841 parent ee134141 file · +15 −17Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_libplacebo.c+15−17
@@ -317,23 +317,6 @@ static void set_gamut_mode(struct pl_color_map_params *p, int gamut_mode) · 316 unmodified lines
317317 av_assert0(0);
318318 };
319319
320−static int update_settings(AVFilterContext *ctx);
321−
322−static int parse_shader(AVFilterContext *avctx, const void *shader, size_t len)
323−{
324− LibplaceboContext *s = avctx->priv;
325− const struct pl_hook *hook;
326−
327− hook = pl_mpv_user_shader_parse(s->gpu, shader, len);
328− if (!hook) {
329− av_log(s, AV_LOG_ERROR, "Failed parsing custom shader!\n");
330− return AVERROR(EINVAL);
331− }
332−
333− s->hooks[s->num_hooks++] = hook;
334− return update_settings(avctx);
335−}
336−
337320 static int find_scaler(AVFilterContext *avctx,
338321 const struct pl_filter_config **opt,
339322 const char *name, int frame_mixing)
@@ -487,6 +470,21 @@ fail: · 147 unmodified lines
487470 return err;
488471 }
489472
473+static int parse_shader(AVFilterContext *avctx, const void *shader, size_t len)
474+{
475+ LibplaceboContext *s = avctx->priv;
476+ const struct pl_hook *hook;
477+
478+ hook = pl_mpv_user_shader_parse(s->gpu, shader, len);
479+ if (!hook) {
480+ av_log(s, AV_LOG_ERROR, "Failed parsing custom shader!\n");
481+ return AVERROR(EINVAL);
482+ }
483+
484+ s->hooks[s->num_hooks++] = hook;
485+ return update_settings(avctx);
486+}
487+
490488 static void libplacebo_uninit(AVFilterContext *avctx);
491489
492490 static int libplacebo_init(AVFilterContext *avctx)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t