[FFmpeg-cvslog] avformat/matroska: Support JPEG2000 for demuxing
Andreas Rheinhardt
git at videolan.org
Sat Jun 7 11:17:17 EEST 2025
ffmpeg | branch: release/7.1 | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun May 25 03:31:17 2025 +0200| [0f1fe3d153e8869b4e768a548ad9b5148a45280f] | committer: Andreas Rheinhardt
avformat/matroska: Support JPEG2000 for demuxing
Legal since commit 1cd0a9be4b2d1e7c60184ec68404e00e46e3123e
(Jan 4) in the Cellar Matroska specification git repo.
We still hold out on muxing it due to compatibility with
old demuxers.
Reviewed-by: compn <ff at hawaiiantel.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
(cherry picked from commit 8a936b8726e10d84a06cacc872d267020f1ef156)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f1fe3d153e8869b4e768a548ad9b5148a45280f
---
libavformat/matroska.c | 1 +
libavformat/matroskaenc.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index d0ecfbeb6a..7d94ed236f 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -82,6 +82,7 @@ const CodecTags ff_mkv_codec_tags[]={
{"V_AVS3" , AV_CODEC_ID_AVS3},
{"V_DIRAC" , AV_CODEC_ID_DIRAC},
{"V_FFV1" , AV_CODEC_ID_FFV1},
+ {"V_JPEG2000" , AV_CODEC_ID_JPEG2000},
{"V_MJPEG" , AV_CODEC_ID_MJPEG},
{"V_MPEG1" , AV_CODEC_ID_MPEG1VIDEO},
{"V_MPEG2" , AV_CODEC_ID_MPEG2VIDEO},
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 60c896e964..5d00b26729 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1956,8 +1956,8 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
// look for a codec ID string specific to mkv to use,
// if none are found, use AVI codes
- if (par->codec_id == AV_CODEC_ID_FFV1) {
- /* FFV1 is actually supported natively in Matroska,
+ if (par->codec_id == AV_CODEC_ID_FFV1 || par->codec_id == AV_CODEC_ID_JPEG2000) {
+ /* FFV1 and JPEG2000 are actually supported natively in Matroska,
* yet we use the VfW way to mux it for compatibility
* with old demuxers. (FIXME: Are they really important?) */
} else if (par->codec_id != AV_CODEC_ID_RAWVIDEO || par->codec_tag) {
More information about the ffmpeg-cvslog
mailing list