From patchwork Thu Feb 24 11:49:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 34514 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:d078:0:0:0:0 with SMTP id x24csp1750843nkx; Thu, 24 Feb 2022 03:49:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwMd4r0zBtofEBaba3s1NmjnixXXabWtQEtTX+WUdAoqKOOzcrb0Fd4dM9vPdlFewgygyS X-Received: by 2002:a17:906:40da:b0:6ce:51b:a593 with SMTP id a26-20020a17090640da00b006ce051ba593mr1988692ejk.604.1645703384368; Thu, 24 Feb 2022 03:49:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645703384; cv=none; d=google.com; s=arc-20160816; b=u1n0WOMuOAjdIkZgDNGca/XhR7VZwqU9eDObsMe/MBZuitRi/d2r+z5LNBUV8wUOZS Btlk4TajxdBSYfRYAB5xpWMebNCd2HBk4gxpimetu0BUnarAgv6Ha9R2I9Wq3RSLL2fZ VkBryDC90Neq10lUc3CO3jLI+yWAnY3Ub0AycTl31zAVlxF/Jj/qNUhSI0q1UAiJQFzy W/PaNjFz5s8K2Ox5tWDYyPkz1EzHVTAgifaPwW+tqUKEY7oPFQRBjt3SRLRia0R40qSQ ocEuuQQNoRJrRW3IRJZmUv65mLju8yDszN8NpAKvLNzFrxn1XrjVY6uAsnangNfqXDbI A/6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=nfsBPE4VyMJkJ1iEe2Io22SQ10odDfR+OYyEoRw7IL8=; b=auqzwtF4zO1LFeTC3e9KaD2FHS96/8ekTjnuCkFJINVDFs+75epTQhASo4fogIUxGA A5R7jKcRfToQbeAIEEPCzv4863Xyw3259CG61i9wUgOdVU+feW4s5cQ0XcOT91Khp+WM kF/97h2wXwm5XLKa6svexyRdKl/j/DEUpLGy+JB6njDv2iBLKEXP7m/ZzZ31Qk+uyCQn foFbYM36a7RonUVGQ+Nwv7RxiyW0jazKghD3Zof7F173MrnsY49by17P1Y1bofnbtGgy xcy7x/IsHd4mDzDgKUMSdnb75CLj1l6FZX+GTcesfAMhJCmwS761cEnfh0WI2Sehqz0O Xwxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=MKnCFJhL; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pkh.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t1si1472298edd.119.2022.02.24.03.49.44; Thu, 24 Feb 2022 03:49:44 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=MKnCFJhL; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pkh.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6EF5A68B334; Thu, 24 Feb 2022 13:49:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from ssq0.pkh.me (laubervilliers-656-1-228-164.w92-154.abo.wanadoo.fr [92.154.28.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F419C68B324 for ; Thu, 24 Feb 2022 13:49:14 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pkh.me; s=selector1; t=1645703347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2rFUjeAYkxRG68Z7RjVeRyq+gS2vrjL2QLJv8LT5wg8=; b=MKnCFJhLf7VTbqKpFm2HIfBFofW0W1JaTBFVg7kHBhRXb5fBm9XXEpDBWETInQ7ly3uv1j 2E/HnhGi6yUsslTn5eYluYYKoeOVHYJCGpj0sXF/E/n32m4hNF1f76NVsBvKiGozf1qkN1 jjWhuCWemPPiEU5QX68zSoM+ZiPxHYo= Received: from localhost (ssq0.pkh.me [local]) by ssq0.pkh.me (OpenSMTPD) with ESMTPA id d7aa120a; Thu, 24 Feb 2022 11:49:07 +0000 (UTC) From: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 24 Feb 2022 12:49:00 +0100 Message-Id: <20220224114903.251006-3-u@pkh.me> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220224114903.251006-1-u@pkh.me> References: <20220224114903.251006-1-u@pkh.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/5] avformat/mov: add support for sync group in sbgp box 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 Cc: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: a+kL5fMp+/pa --- libavformat/isom.h | 2 ++ libavformat/mov.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/libavformat/isom.h b/libavformat/isom.h index 625dea8421..e326f4f27f 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -218,6 +218,8 @@ typedef struct MOVStreamContext { int start_pad; ///< amount of samples to skip due to enc-dec delay unsigned int rap_group_count; MOVSbgp *rap_group; + unsigned int sync_group_count; + MOVSbgp *sync_group; int nb_frames_for_fps; int64_t duration_for_fps; diff --git a/libavformat/mov.c b/libavformat/mov.c index aade052b7a..ebc397e573 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3152,6 +3152,9 @@ static int mov_read_sbgp(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (grouping_type == MKTAG('r','a','p',' ')) { tablep = &sc->rap_group; table_count = &sc->rap_group_count; + } else if (grouping_type == MKTAG('s','y','n','c')) { + tablep = &sc->sync_group; + table_count = &sc->sync_group_count; } else { return 0; } @@ -4371,6 +4374,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_freep(&sc->stps_data); av_freep(&sc->elst_data); av_freep(&sc->rap_group); + av_freep(&sc->sync_group); return 0; } @@ -7708,6 +7712,7 @@ static int mov_read_close(AVFormatContext *s) av_freep(&sc->stps_data); av_freep(&sc->elst_data); av_freep(&sc->rap_group); + av_freep(&sc->sync_group); av_freep(&sc->display_matrix); av_freep(&sc->index_ranges);