diff options
author | sfan5 <sfan5@live.de> | 2023-01-10 18:59:21 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-01-12 22:02:07 +0100 |
commit | 7b03cd367dd5416a4728ccea7e47dcd2827cbab7 (patch) | |
tree | cea4075b81850000890f55d6cd01de117a2138a0 /video/out/gpu/lcms.c | |
parent | b6b83805183618f3a46f2cc77d85dcff72ef6396 (diff) | |
download | mpv-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/gpu/lcms.c')
-rw-r--r-- | video/out/gpu/lcms.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/video/out/gpu/lcms.c b/video/out/gpu/lcms.c index b49b9614a2..3df5eba5f2 100644 --- a/video/out/gpu/lcms.c +++ b/video/out/gpu/lcms.c @@ -317,8 +317,7 @@ bool gl_lcms_get_lut3d(struct gl_lcms *p, struct lut3d **result_lut3d, if (vid_profile) { MP_VERBOSE(p, "Got an embedded ICC profile.\n"); p->vid_profile = av_buffer_ref(vid_profile); - if (!p->vid_profile) - abort(); + MP_HANDLE_OOM(p->vid_profile); } if (!gl_parse_3dlut_size(p->opts->size_str, &s_r, &s_g, &s_b)) @@ -344,8 +343,7 @@ bool gl_lcms_get_lut3d(struct gl_lcms *p, struct lut3d **result_lut3d, uint8_t hash[32]; struct AVSHA *sha = av_sha_alloc(); - if (!sha) - abort(); + MP_HANDLE_OOM(sha); av_sha_init(sha, 256); av_sha_update(sha, cache_info, strlen(cache_info)); if (vid_profile) |