summaryrefslogtreecommitdiffstats
path: root/filters/f_lavfi.c
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2023-01-10 18:59:21 +0100
committersfan5 <sfan5@live.de>2023-01-12 22:02:07 +0100
commit7b03cd367dd5416a4728ccea7e47dcd2827cbab7 (patch)
treecea4075b81850000890f55d6cd01de117a2138a0 /filters/f_lavfi.c
parentb6b83805183618f3a46f2cc77d85dcff72ef6396 (diff)
downloadmpv-7b03cd367dd5416a4728ccea7e47dcd2827cbab7.tar.bz2
mpv-7b03cd367dd5416a4728ccea7e47dcd2827cbab7.tar.xz
various: replace if + abort() with MP_HANDLE_OOM()
MP_HANDLE_OOM also aborts but calls assert() first, which will result in an useful message if compiled in debug mode.
Diffstat (limited to 'filters/f_lavfi.c')
-rw-r--r--filters/f_lavfi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/filters/f_lavfi.c b/filters/f_lavfi.c
index 41a3ea4eac..14ed2483a2 100644
--- a/filters/f_lavfi.c
+++ b/filters/f_lavfi.c
@@ -260,8 +260,7 @@ static void precreate_graph(struct lavfi *c, bool first_init)
c->failed = false;
c->graph = avfilter_graph_alloc();
- if (!c->graph)
- abort();
+ MP_HANDLE_OOM(c->graph);
if (mp_set_avopts(c->log, c->graph, c->graph_opts) < 0)
goto error;
@@ -852,8 +851,7 @@ static struct lavfi *lavfi_alloc(struct mp_filter *parent)
c->log = f->log;
c->public.f = f;
c->tmp_frame = av_frame_alloc();
- if (!c->tmp_frame)
- abort();
+ MP_HANDLE_OOM(c->tmp_frame);
return c;
}