diff options
author | Niklas Haas <git@haasn.xyz> | 2021-02-16 14:20:26 +0100 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2021-02-16 14:22:29 +0100 |
commit | c766e47b7095568509173e49fb049ff1b501b71d (patch) | |
tree | e01b0a7226f905969d011a4b393e150e3a795d21 | |
parent | b0b37df31faf01cd88e22ef5be882628b3d8d607 (diff) | |
download | mpv-c766e47b7095568509173e49fb049ff1b501b71d.tar.bz2 mpv-c766e47b7095568509173e49fb049ff1b501b71d.tar.xz |
vo_gpu: don't abort() if plane tex creation fails
In this case, we just treat all uploads as automatically failing. That
error path already exists and is already handled correctly.
Fixes #8566
-rw-r--r-- | video/out/gpu/video.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 2aae3171e6..e5a9737473 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -957,9 +957,6 @@ static void init_video(struct gl_video *p) params.w, params.h); plane->tex = ra_tex_create(p->ra, ¶ms); - if (!plane->tex) - abort(); // shit happens - p->use_integer_conversion |= format->ctype == RA_CTYPE_UINT; } } @@ -3588,6 +3585,10 @@ static bool pass_upload_image(struct gl_video *p, struct mp_image *mpi, uint64_t timer_pool_start(p->upload_timer); for (int n = 0; n < p->plane_count; n++) { struct texplane *plane = &vimg->planes[n]; + if (!plane->tex) { + timer_pool_stop(p->upload_timer); + goto error; + } struct ra_tex_upload_params params = { .tex = plane->tex, |