From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 75A9849485 for ; Tue, 12 Mar 2024 18:46:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E1B4568D197; Tue, 12 Mar 2024 20:45:43 +0200 (EET) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C336D68D13D for ; Tue, 12 Mar 2024 20:45:37 +0200 (EET) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6e68bab3e4cso2449859b3a.0 for ; Tue, 12 Mar 2024 11:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710269135; x=1710873935; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WFfoqHLApAQUl51a+4XmkSe95+80D2e3szmZFi6Vl34=; b=nL29hfGnrh9KV3egyDypLTcvZd0bPkGkEc4srMAV3HKdBuF51xk5VV/dtfQ6msdPs0 MiNVyum7NMqdmOqn0ip4YScITMNLmRqL/3Tsim8ZiDK8+ufJFY7BzIpmleMmjGsC/SLg YOJ689xbTwNyfferoq1kOhVxJRdqhB81A2FUK7swxBP16NHTgv7HGssbgfIHzV88vLEA Kk8FssNx1spwO8R5yIstM0APv+g7R/X69cPfbjOPZVtn9BSmAYLmWlVPRZMa9jZiTrrl DYA5Nc/1zJBDIt28fjnDwlg/v7IUXtHLoh0hxf+NuHmuJpgjLjfft7s5/q5wk+Wi2efM sqCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710269135; x=1710873935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WFfoqHLApAQUl51a+4XmkSe95+80D2e3szmZFi6Vl34=; b=LbJFJLa5GQTL2NrzGabv5pt+GGmU725uBTaSjuDmx+BbQhDTFnqwazap4Spd3oW7Wm izBRZ+QmUiVVDILKzsaJIAJhy3Y/Fj8CoBz5fpsmOIjqGgYUjguELVKbh2YDcbbvJhwh slF93veMImEsgrCBcQFG/cXoywHHJPthtBxQj1CqWviYagRyQC1mFSc3IpB44pX/z3yS OlpMD+685PEZjJ2rnzqRhZQb/zgK4wiM67hIIeXQygXf8oboNrJf1himgOIf4kCwlCUq MFHod8smWIzvJXBhr5BMUXdbZAzMs1yf1evmk3yu1ejPvfrmoY2kITT569jdshWPWWyh Zk6A== X-Gm-Message-State: AOJu0Yz0UJHKGURAER54fToyXxavUB0T4N7ZjcinncZrTiwxgGahOeI1 zLAXIDpLMaPDLK4PVvCD/iHBnNkj9kll0EiUdSOTxN5aoZB+H7sAfCuldcLy X-Google-Smtp-Source: AGHT+IEQrAgoioCvUh7oSwqAeIAAh4ZdwxRBLwGr3KB2hOFAV3boqkqJoggn7UAhqJyU6NtuNHKLiA== X-Received: by 2002:a05:6a21:6711:b0:1a3:17f0:c4f3 with SMTP id wh17-20020a056a21671100b001a317f0c4f3mr6548889pzb.35.1710269135662; Tue, 12 Mar 2024 11:45:35 -0700 (PDT) Received: from localhost.localdomain ([190.194.169.124]) by smtp.gmail.com with ESMTPSA id y187-20020a62cec4000000b006e4d8687f44sm6734326pfg.102.2024.03.12.11.45.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 11:45:35 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Mar 2024 15:44:35 -0300 Message-ID: <20240312184435.7420-4-jamrial@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312184435.7420-1-jamrial@gmail.com> References: <20240312184435.7420-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/4] avformat/matroska: use named constants for ITU-T T.35 metadata X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Signed-off-by: James Almer --- 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".