The code above this does a whitelist on desc->flags, which now includes the (disallowed) AV_PIX_FMT_FLAG_XYZ for XYZ formats. So there is no more need for a separate check, here.
Unified · Split
| @@ -22,7 +22,6 @@ · 21 unmodified lines | ||
| 22 | 22 | #include <string.h> |
| 23 | 23 | |
| 24 | 24 | #include "libavutil/avassert.h" |
| 25 | −#include "libavutil/avstring.h" | |
| 26 | 25 | #include "libavutil/avutil.h" |
| 27 | 26 | #include "libavutil/csp.h" |
| 28 | 27 | #include "libavutil/intreadwrite.h" |
| @@ -94,8 +93,6 @@ int ff_draw_init2(FFDrawContext *draw, enum AVPixelFormat format, enum AVColorSp · 65 unmodified lines | ||
| 94 | 93 | return AVERROR(ENOSYS); |
| 95 | 94 | if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA)) |
| 96 | 95 | return AVERROR(ENOSYS); |
| 97 | − if (av_strstart(desc->name, "xyz", NULL)) | |
| 98 | − return AVERROR(ENOSYS); | |
| 99 | 96 | if (csp == AVCOL_SPC_UNSPECIFIED) |
| 100 | 97 | csp = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? AVCOL_SPC_RGB : AVCOL_SPC_SMPTE170M; |
| 101 | 98 | if (!(desc->flags & AV_PIX_FMT_FLAG_RGB) && !(luma = av_csp_luma_coeffs_from_avcsp(csp))) |