Skip to content

Commit

Permalink
renderer: don't assert on a failed icc profile
Browse files Browse the repository at this point in the history
At least for mpv, if we have a playlist of images, fail opening the ICC
of one image, go forward and then back to the image with the ICC
failure, it'll hit this assertion failure. Not so nice. If there's no
ICC information, it just does nothing so display the image as usual.
  • Loading branch information
Dudemanguy committed Nov 3, 2023
1 parent de6d57f commit 2510304
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2869,10 +2869,8 @@ static void icc_fallback(struct pass_state *pass, struct pl_frame *frame,
return;

// Don't re-attempt opening already failed profiles
if (fallback->error && fallback->error == frame->profile.signature) {
pl_assert(!fallback->icc);
if (fallback->error && fallback->error == frame->profile.signature)
return;
}

#ifdef PL_HAVE_LCMS
pl_renderer rr = pass->rr;
Expand Down

0 comments on commit 2510304

Please sign in to comment.