From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 4/4] avformat/matroska: use named constants for ITU-T T.35 metadata Date: Tue, 12 Mar 2024 15:44:35 -0300 Message-ID: <20240312184435.7420-4-jamrial@gmail.com> (raw) In-Reply-To: <20240312184435.7420-1-jamrial@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com> --- libavformat/matroskadec.c | 4 +++- libavformat/matroskaenc.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index a35ca6ca5b..8897fd622c 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -54,6 +54,7 @@ #include "libavcodec/bytestream.h" #include "libavcodec/defs.h" #include "libavcodec/flac.h" +#include "libavcodec/itut35.h" #include "libavcodec/mpeg4audio.h" #include "libavcodec/packet_internal.h" @@ -3884,7 +3885,8 @@ static int matroska_parse_block_additional(MatroskaDemuxContext *matroska, country_code = bytestream2_get_byteu(&bc); provider_code = bytestream2_get_be16u(&bc); - if (country_code != 0xB5 || provider_code != 0x3C) + if (country_code != ITU_T_T35_COUNTRY_CODE_US || + provider_code != ITU_T_T35_PROVIDER_CODE_SMTPE) break; // ignore provider_oriented_code = bytestream2_get_be16u(&bc); diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 8ba0690f90..c2e172d5c0 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -63,6 +63,7 @@ #include "libavcodec/codec_desc.h" #include "libavcodec/codec_par.h" #include "libavcodec/defs.h" +#include "libavcodec/itut35.h" #include "libavcodec/xiph.h" #include "libavcodec/mpeg4audio.h" @@ -2824,8 +2825,8 @@ static int mkv_write_block(void *logctx, MatroskaMuxContext *mkv, uint8_t *payload = t35_buf; size_t payload_size = sizeof(t35_buf) - 6; - bytestream_put_byte(&payload, 0xB5); // country_code - bytestream_put_be16(&payload, 0x3C); // provider_code + bytestream_put_byte(&payload, ITU_T_T35_COUNTRY_CODE_US); // country_code + bytestream_put_be16(&payload, ITU_T_T35_PROVIDER_CODE_SMTPE); // provider_code bytestream_put_be16(&payload, 0x01); // provider_oriented_code bytestream_put_byte(&payload, 0x04); // application_identifier -- 2.44.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2024-03-12 18:46 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-12 18:44 [FFmpeg-devel] [PATCH 1/4] avcodec/av1dec: " James Almer 2024-03-12 18:44 ` [FFmpeg-devel] [PATCH 2/4] avcodec/h2645_sei: " James Almer 2024-03-12 18:44 ` [FFmpeg-devel] [PATCH 3/4] avcodec/libdav1d: " James Almer 2024-03-12 18:44 ` James Almer [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240312184435.7420-4-jamrial@gmail.com \ --to=jamrial@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git