summaryrefslogtreecommitdiffstats
path: root/sub/osd.c
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2023-06-28 11:42:22 +0600
committerPhilip Langdale <github.philipl@overt.org>2023-06-28 20:56:23 -0700
commitd70b859084b2a8fced2f13d6618684d3b2cd9948 (patch)
tree5fab0a67967d880767e300f24cc838c70a9c01b9 /sub/osd.c
parent2f220c6286cdf63988aea05811db3f315abe16ea (diff)
downloadmpv-d70b859084b2a8fced2f13d6618684d3b2cd9948.tar.bz2
mpv-d70b859084b2a8fced2f13d6618684d3b2cd9948.tar.xz
mp_image: abort on av_buffer_ref() failure
this changes mp_image_new_ref() to handle allocation failure itself instead of doing it at its many call-sites (some of which never checked for failure at all). also remove MP_HANDLE_OOM() from the call sites since this is not necessary anymore. not all the call-sites have been touched, since some of the caller might be relying on `mp_image_new_ref(NULL)` returning NULL. Fixes: https://github.com/mpv-player/mpv/issues/11840
Diffstat (limited to 'sub/osd.c')
-rw-r--r--sub/osd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sub/osd.c b/sub/osd.c
index f949bc94b5..811b6c821b 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -548,7 +548,6 @@ struct sub_bitmaps *sub_bitmaps_copy(struct sub_bitmap_copy_cache **p_cache,
assert(in->packed && in->packed->bufs[0]);
res->packed = mp_image_new_ref(res->packed);
- MP_HANDLE_OOM(res->packed);
talloc_steal(res, res->packed);
res->parts = NULL;