This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 004127f00b209b29730002f08a276a04ef9a4e47 Author: Niklas Haas <[email protected]> AuthorDate: Fri Dec 5 19:12:11 2025 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Tue Dec 9 09:47:48 2025 +0000 swscale/format: explicitly test for unsupported subsampled formats This includes semiplanar formats. Note that the first check typically subsumes the second check, but I decided to keep both for clarity. --- libswscale/format.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libswscale/format.c b/libswscale/format.c index 076990d48d..ffdde2af01 100644 --- a/libswscale/format.c +++ b/libswscale/format.c @@ -787,6 +787,15 @@ static int fmt_read_write(enum AVPixelFormat fmt, SwsReadWriteOp *rw_op, if (!desc) return AVERROR(EINVAL); + /* No support for subsampled formats at the moment */ + if (desc->log2_chroma_w || desc->log2_chroma_h) + return AVERROR(ENOTSUP); + + /* No support for semi-planar formats at the moment */ + if (desc->flags & AV_PIX_FMT_FLAG_PLANAR && + av_pix_fmt_count_planes(fmt) < desc->nb_components) + return AVERROR(ENOTSUP); + *pixel_type = fmt_pixel_type(fmt); if (!*pixel_type) return AVERROR(ENOTSUP); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
