Not doing so is an obvious oversight - the ICC profile is tied to the original colorspace, so if we change it, we should definitely strip this information. We should probably also have an extra option to control whether the ICC profile should be stripped, ignored, or applied, but for now this fixes an existing bug.
Unified · Split
| @@ -535,6 +535,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) · 534 unmodified lines | ||
| 535 | 535 | if (changed_csp) { |
| 536 | 536 | av_frame_remove_side_data(out, AV_FRAME_DATA_MASTERING_DISPLAY_METADATA); |
| 537 | 537 | av_frame_remove_side_data(out, AV_FRAME_DATA_CONTENT_LIGHT_LEVEL); |
| 538 | + av_frame_remove_side_data(out, AV_FRAME_DATA_ICC_PROFILE); | |
| 538 | 539 | } |
| 539 | 540 | if (s->apply_dovi || changed_csp) { |
| 540 | 541 | av_frame_remove_side_data(out, AV_FRAME_DATA_DOVI_RPU_BUFFER); |