From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id D65FC44AD8 for ; Sun, 19 Oct 2025 16:34:28 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'CQYO/F5J3RMch4M6C3Ut1/XoUsm6+625Szusz6vLVNU=', expected b'TvrvMqC3wGPkAt0+V197ariGVpAYpcMIxR9kKx+1eoM=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1760891656; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=CQYO/F5J3RMch4M6C3Ut1/XoUsm6+625Szusz6vLVNU=; b=VzbIuET9CbobxozfpplF19fkuk+YNlGUI89Sjl0mKoGU9HNsUIH3G1igCsOFS2PuPQb3Y 9/FgKQxJhuDsrORGRooZRwWrH/K7y0vi5KaHsb6V8O7Ggvf1tYRt2bAzo6fDbY8iiKxpVZG r2+vwIqUTqThw7vmC+1xqzW75zfuJWYdfFcy39InZEBYQRMkmKxBYIWGV2l2Z+2xyXsV2Ly XgzmcFboF+GwwhxMQjDN7yW6jtbfTFU+76TlOtwEczKyf9yTagR67OItAi1XwAEWXz1OP8r SLmL2yxLiHMkdEqU5H54Q1uWbU7ccfPVknzHqVtb3zp1D/L4fgab/RyCJspw== Received: from [172.19.0.2] (unknown [172.19.0.2]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 67F7568F49D; Sun, 19 Oct 2025 19:34:16 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1760891642; b=jynds8CebL5v/0JwGjomh9b9cEOG3gwK3gl8Uf6mM2k+SJyvJjAa3wLUuBj9r3uKxmnB+ uTnMsRNMN+4n2n/T3QmRsNsiFwwxzvWJqAd2SuUhgnAf4Y4RIq8Oj+TKzgBfhJ3zpfbVg3n CsS8CdIMIfbYS/9fx2JK5OHustPsduOcfjTUHJAnY13yackaVwsMJDvhi2NcAOb1nwALBLZ Toj3w73q/oXpfki/0JfxszrnH+1dqnXseRBYMilNHZJbou9Nup65TpzdWhiXBHFmcyapOM2 bIZ9mAlCzdsL7clrV6dMqxyMaSv1NA426bqaCJi0Yl//Sp+Um9BcUe5xVMrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1760891642; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=slvq+asfha4THk3sLunU2FOh/xs277O2drsXlDdDgrc=; b=HMVNYa+4Ss7FyCJNcnjUa+B49TpvPZkxdM1gZ//UZTO2yZGwsF1uoDQJA8A0cNvGoCRQd 6uQPpH/zB/Axq1wBSgQX+0EF0etJskvOkbsAopIxrtpsXte7HeR8A2qPdmzUhrQBipievih v/VSgGIJ0ecc0dspMad5mN+CeiQBgmrAwlXputvGxeHjUbJXpizvcGZjePP0NmoJcusIbHu dEHHIyNUYf3JiPLpdtoNaOU0oiLiAdyHW6Jjxn9BOefKUNNCBI0ezAIVNA8mEDC87BbhXml eTSsmUpKr/QiBJtMgEFhwZxkL5xRtROTqgeHAYGh04qZMTxRbL8jtkgOfasA== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1760891635; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=TvrvMqC3wGPkAt0+V197ariGVpAYpcMIxR9kKx+1eoM=; b=lqBLZRvvdTlCQ6rp9GZ2t01w2I4GA0J0ZTvH9EEBcI1Qku7NT4JiMGNxGLe1MggoFvs9c Nyllc4isqgJ+zLA9ej079iQNjfgSdr2He5MVXPmtPrwomSrKEWLhCcrMy6ncVz8Lrp84uSe WuIHg/5OXVyJPT4vK+vxdpfHAy2JxNQ5R+JySUVTnCLzQGvB62peKJA+sb4/QpJCgwGnWGz z8w7uskVSxA+m6URXJzKTnc0opb83+2uzRn2prHqUwSqwuL0EEiZaZLS4/dgaq36aqFvNLc Hh2kO1mjP3Szjp0tjNH3XOu0o4DqxmJmRO2oXKig/hgx70PHTtVrCRxfGG9g== Received: from 547bf0a948a1 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 9FBE9680023 for ; Sun, 19 Oct 2025 19:33:55 +0300 (EEST) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 Oct 2025 16:33:55 -0000 Message-ID: <176089163577.62.8732833664728615005@bf907ddaa564> Message-ID-Hash: TESIU2ZKTWPJISOGPIMKAHQT2IYQSAIA X-Message-ID-Hash: TESIU2ZKTWPJISOGPIMKAHQT2IYQSAIA X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avformat/mov: Add support for uuid-based senc box (PR #20719) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Hendi48 via ffmpeg-devel Cc: Hendi48 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20719 opened by Hendi48 URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20719 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20719.patch In PIFF-branded mp4 files, the senc data comes in a uuid box. The rest of the CENC code is already working fine with such files; this change is the only thing required to make them decode-able with ffmpeg. The UUID referenced in the code is defined in the Protected Interoperable File Format 1.1 specification, section 5.3.2. >>From ce5fbb8c9da0e81e6336bc33b0416ef6a7be75d7 Mon Sep 17 00:00:00 2001 From: Hendi Date: Sun, 19 Oct 2025 18:24:58 +0200 Subject: [PATCH] avformat/mov: Add support for uuid-based senc box In PIFF-branded mp4 files, the senc data comes in a uuid box. --- libavformat/mov.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index a962594990..664c5764ae 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7229,6 +7229,8 @@ out: return ret; } +static int mov_read_senc(MOVContext *c, AVIOContext *pb, MOVAtom atom); + static int mov_read_uuid(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; @@ -7247,6 +7249,10 @@ static int mov_read_uuid(MOVContext *c, AVIOContext *pb, MOVAtom atom) 0xff, 0xcc, 0x82, 0x63, 0xf8, 0x55, 0x4a, 0x93, 0x88, 0x14, 0x58, 0x7a, 0x02, 0x52, 0x1f, 0xdd, }; + static const AVUUID uuid_piff_senc = { + 0xa2, 0x39, 0x4f, 0x52, 0x5a, 0x9b, 0x4f, 0x14, + 0xa2, 0x44, 0x6c, 0x42, 0x7c, 0x64, 0x8d, 0xf4 + }; if (atom.size < AV_UUID_LEN || atom.size >= FFMIN(INT_MAX, SIZE_MAX)) return AVERROR_INVALIDDATA; @@ -7329,6 +7335,8 @@ static int mov_read_uuid(MOVContext *c, AVIOContext *pb, MOVAtom atom) return ret; if (!sc->spherical) av_log(c->fc, AV_LOG_WARNING, "Invalid spherical metadata found\n"); + } else if (av_uuid_equal(uuid, uuid_piff_senc)) { + mov_read_senc(c, pb, atom); } return 0; -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org