This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 246d0da2c1 avformat/img2enc: Split rawvideo planes only for fully
planar formats
246d0da2c1 is described below
commit 246d0da2c1b1f1924c9ba3b585a1ff3582d0e3f1
Author: Zhao Zhili <[email protected]>
AuthorDate: Mon Oct 19 21:11:12 2026 +0800
Commit: Zhao Zhili <[email protected]>
CommitDate: Mon Oct 26 17:02:09 2026 +0000
avformat/img2enc: Split rawvideo planes only for fully planar formats
AV_PIX_FMT_FLAG_PLANAR does not exclude semi-planar formats such as
NV12, so they were split into .y/.U/.V files with corrupted chroma:
ffmpeg -f lavfi -i testsrc -frames:v 1 -pix_fmt nv12 \
-c:v rawvideo out.%03d.y
Signed-off-by: Zhao Zhili <[email protected]>
---
libavformat/img2enc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index 5a39a1b0c0..7bde30cb81 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -106,7 +106,12 @@ static int write_header(AVFormatContext *s)
&& !av_strcasecmp(str + 1, "y")
&& s->nb_streams == 1
&& desc
- &&(desc->flags & AV_PIX_FMT_FLAG_PLANAR)
+ /* Semi-planar formats such as NV12 keep several
+ * components in one plane, so splitting per
+ * component needs one plane per component.
+ */
+ && av_pix_fmt_count_planes(st->codecpar->format)
+ == desc->nb_components
&& desc->nb_components >= 3;
}
img->img_number = img->start_img_number;
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]