summaryrefslogtreecommitdiffstats
path: root/video/out/vo.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 /video/out/vo.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 'video/out/vo.c')
-rw-r--r--video/out/vo.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index a5458b593e..cf806b2244 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -1431,8 +1431,7 @@ struct vo_frame *vo_frame_ref(struct vo_frame *frame)
*new = *frame;
for (int n = 0; n < frame->num_frames; n++) {
new->frames[n] = mp_image_new_ref(frame->frames[n]);
- if (!new->frames[n])
- abort(); // OOM on tiny allocs
+ MP_HANDLE_OOM(new->frames[n]);
}
new->current = new->num_frames ? new->frames[0] : NULL;
return new;