[FFmpeg-devel] [PATCH 2/2] avformat/jpegxl_anim_dec: use new animated JPEG XL codec ID

Leo Izen leo.izen at gmail.com
Wed Dec 4 16:59:23 EET 2024


A new codec ID has been added to avcodec for animated JPEG XL, so
we should use that in the animated JPEG XL demuxer.

Signed-off-by: Leo Izen <leo.izen at gmail.com>
---
 libavformat/jpegxl_anim_dec.c        | 2 +-
 tests/ref/fate/jxl-anim-demux-icos4d | 2 +-
 tests/ref/fate/jxl-anim-demux-newton | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/jpegxl_anim_dec.c b/libavformat/jpegxl_anim_dec.c
index 2338a2e8c0..612f8a9fb2 100644
--- a/libavformat/jpegxl_anim_dec.c
+++ b/libavformat/jpegxl_anim_dec.c
@@ -136,7 +136,7 @@ static int jpegxl_anim_read_header(AVFormatContext *s)
         return AVERROR(ENOMEM);
 
     st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
-    st->codecpar->codec_id   = AV_CODEC_ID_JPEGXL;
+    st->codecpar->codec_id   = AV_CODEC_ID_JPEGXL_ANIM;
     avpriv_set_pts_info(st, 1, meta.timebase.num, meta.timebase.den);
     ffstream(st)->need_parsing = AVSTREAM_PARSE_FULL;
 
diff --git a/tests/ref/fate/jxl-anim-demux-icos4d b/tests/ref/fate/jxl-anim-demux-icos4d
index eff6ff1f1b..fc37b035a8 100644
--- a/tests/ref/fate/jxl-anim-demux-icos4d
+++ b/tests/ref/fate/jxl-anim-demux-icos4d
@@ -1,6 +1,6 @@
 #tb 0: 1/1000
 #media_type 0: video
-#codec_id 0: jpegxl
+#codec_id 0: jpegxl_anim
 #dimensions 0: 48x48
 #sar 0: 0/1
 0,          0,          0,        0,    67898, 0x53b6516b
diff --git a/tests/ref/fate/jxl-anim-demux-newton b/tests/ref/fate/jxl-anim-demux-newton
index 6fcb85c41e..8a44d8e255 100644
--- a/tests/ref/fate/jxl-anim-demux-newton
+++ b/tests/ref/fate/jxl-anim-demux-newton
@@ -1,6 +1,6 @@
 #tb 0: 1/1000
 #media_type 0: video
-#codec_id 0: jpegxl
+#codec_id 0: jpegxl_anim
 #dimensions 0: 128x96
 #sar 0: 0/1
 0,          0,          0,        0,    43376, 0xb2296182
-- 
2.47.1



More information about the ffmpeg-devel mailing list