This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 05bd55ff6eaeb1a352ee40bed58c4ad5740d64e9 Author: James Almer <[email protected]> AuthorDate: Mon Sep 7 17:05:38 2026 -0300 Commit: James Almer <[email protected]> CommitDate: Thu Sep 10 22:38:20 2026 -0300 avformat/cbs: move AV1 feature definition to their own header The lavf AV1 CBS implementation disables metadata, tile lists and padding, but movenccenc.c sees the default AV1RawOBU definition. On 32-bit MinGW, the metadata member raises the union alignment from four to eight bytes, placing obu at offset 16 in the caller instead of offset 12 in CBS. Consequently AV1 CENC reads the wrong fields and fails to write tiles. Move the feature definitions into the common lavf CBS header so that the parser and its callers use the same AV1RawOBU layout. Keep the reduced set of parsed OBU types. Add a FATE encryption/decryption test using the existing nonuniform-tile AV1 sample. The test fails before this change with GCC -m32 -malign-double (which reproduces the relevant MinGW layout) and passes afterwards with the same reference on that configuration and AArch64. Fixes #23069. Assisted-by: Fairy Signed-off-by: James Almer <[email protected]> --- libavformat/cbs_av1.c | 5 +---- libavformat/{cbs_av1.c => cbs_av1.h} | 11 +++++++++-- libavformat/movenccenc.c | 2 +- tests/fate/mov.mak | 5 +++++ tests/ref/fate/mov-av1-cenc | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 7 deletions(-) diff --git a/libavformat/cbs_av1.c b/libavformat/cbs_av1.c index efaed7dfd0..93bcbb878d 100644 --- a/libavformat/cbs_av1.c +++ b/libavformat/cbs_av1.c @@ -16,8 +16,5 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define CBS_AV1_OBU_TILE_LIST 0 -#define CBS_AV1_OBU_METADATA 0 -#define CBS_AV1_OBU_PADDING 0 -#include "cbs.h" +#include "cbs_av1.h" #include "libavcodec/cbs_av1.c" diff --git a/libavformat/cbs_av1.c b/libavformat/cbs_av1.h similarity index 87% copy from libavformat/cbs_av1.c copy to libavformat/cbs_av1.h index efaed7dfd0..0d5e28d388 100644 --- a/libavformat/cbs_av1.c +++ b/libavformat/cbs_av1.h @@ -16,8 +16,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef AVFORMAT_CBS_AV1_H +#define AVFORMAT_CBS_AV1_H + +#include "cbs.h" + #define CBS_AV1_OBU_TILE_LIST 0 #define CBS_AV1_OBU_METADATA 0 #define CBS_AV1_OBU_PADDING 0 -#include "cbs.h" -#include "libavcodec/cbs_av1.c" + +#include "libavcodec/cbs_av1.h" + +#endif /* AVFORMAT_CBS_AV1_H */ diff --git a/libavformat/movenccenc.c b/libavformat/movenccenc.c index 4e1f31d2b5..4808b59773 100644 --- a/libavformat/movenccenc.c +++ b/libavformat/movenccenc.c @@ -21,7 +21,7 @@ #include "movenccenc.h" #include "libavcodec/av1_parse.h" #include "libavcodec/bytestream.h" -#include "libavcodec/cbs_av1.h" +#include "libavformat/cbs_av1.h" #include "libavutil/attributes.h" #include "libavutil/intreadwrite.h" #include "libavutil/mem.h" diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak index 022e0214d6..ffe555bf74 100644 --- a/tests/fate/mov.mak +++ b/tests/fate/mov.mak @@ -208,6 +208,11 @@ fate-mov-mp4-fragmented-ttml-dfxp: CMD = transcode srt $(TARGET_SAMPLES)/sub/Sub "-f lavfi -i smptehdbars=duration=24.5245:size=320x180:rate=24000/1001,format=yuv420p" \ "" "" "data" +FATE_MOV_FFMPEG_SAMPLES-$(call REMUX, MP4 IVF, MOV_DEMUXER AV1_PARSER EXTRACT_EXTRADATA_BSF) += fate-mov-av1-cenc +fate-mov-av1-cenc: CMD = transcode ivf $(TARGET_SAMPLES)/av1/non_uniform_tiling.ivf mp4 \ + "-c:v copy -encryption_scheme cenc-aes-ctr -encryption_key 00112233445566778899aabbccddeeff -encryption_kid 00112233445566778899aabbccddeeff" \ + "-c:v copy" "" "" "-decryption_key 00112233445566778899aabbccddeeff" + # avif demuxing - still image with 1 item. FATE_MOV_FFMPEG_SAMPLES-$(call FRAMECRC, MOV, AV1, AV1_PARSER) \ += fate-mov-avif-demux-still-image-1-item diff --git a/tests/ref/fate/mov-av1-cenc b/tests/ref/fate/mov-av1-cenc new file mode 100644 index 0000000000..785ea598e3 --- /dev/null +++ b/tests/ref/fate/mov-av1-cenc @@ -0,0 +1,32 @@ +4c0d58049d04303b98cd7c07013a1183 *tests/data/fate/mov-av1-cenc.mp4 +39366 tests/data/fate/mov-av1-cenc.mp4 +#extradata 0: 17, 0x197103ea +#tb 0: 1/12288 +#media_type 0: video +#codec_id 0: av1 +#dimensions 0: 720x300 +#sar 0: 1/1 +0, 0, 0, 512, 17049, 0x6d66f097 +0, 512, 512, 512, 8365, 0x9c48024d, F=0x0 +0, 1024, 1024, 512, 77, 0x88251d4e, F=0x0 +0, 1536, 1536, 512, 232, 0x3c31706f, F=0x0 +0, 2048, 2048, 512, 245, 0x8195753f, F=0x0 +0, 2560, 2560, 512, 271, 0x134f86cc, F=0x0 +0, 3072, 3072, 512, 246, 0x04b777cf, F=0x0 +0, 3584, 3584, 512, 143, 0x6cbd43a3, F=0x0 +0, 4096, 4096, 512, 215, 0x88d66733, F=0x0 +0, 4608, 4608, 512, 83, 0xb2d22362, F=0x0 +0, 5120, 5120, 512, 50, 0x75d211e2, F=0x0 +0, 5632, 5632, 512, 5087, 0x505ec5f3, F=0x0 +0, 6144, 6144, 512, 242, 0x70fe6f2c, F=0x0 +0, 6656, 6656, 512, 366, 0xcb0caedc, F=0x0 +0, 7168, 7168, 512, 644, 0xf72e3623, F=0x0 +0, 7680, 7680, 512, 668, 0x0cff4537, F=0x0 +0, 8192, 8192, 512, 239, 0x364c77a4, F=0x0 +0, 8704, 8704, 512, 400, 0x7e3bbaef, F=0x0 +0, 9216, 9216, 512, 404, 0x175cb5db, F=0x0 +0, 9728, 9728, 512, 277, 0x113185c5, F=0x0 +0, 10240, 10240, 512, 46, 0x0c860cfa, F=0x0 +0, 10752, 10752, 512, 659, 0x501b392a, F=0x0 +0, 11264, 11264, 512, 478, 0x0503e8ec, F=0x0 +0, 11776, 11776, 512, 1132, 0x952a1543, F=0x0 -- 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]
