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 CDFA94AEF7 for ; Mon, 22 Sep 2025 19:06:20 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'o05f5EC2S/nO+e+Ky+1y0qgAkHIrayRffPZfZB0vfl8=', expected b'6joT9ABL2FgfoIFeZ3wRV4lDV/ZWJ4Ku9PL/KncXCSg=')) 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=1758567969; 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=o05f5EC2S/nO+e+Ky+1y0qgAkHIrayRffPZfZB0vfl8=; b=AMvGXQozxQVQ0FuQX9U/XWxgCrRWdsc0boXlKFgKOKqAXts3yNzIOroTO+oTIgZv9bP8e IuloIXm+L4ZXwsFaXOaP3ijlBt+TM8Mtf8nnrx04fmYgHq1MLrWwWbjIut7CKdp3gvHe6Jf 6IeGV22KgK4Xfo76pMmrN5n+snMzd7fQpo9mfcmgD+3xJZEPfJ+pYQGeUsXO8Ic+BYMo/Ky bV20QuXQAuflc07/C4mLM5FqVxrUGlqTLO+11p92Tx9o462/Mw5v/p93+CQTa9BRfHneE2f yk6hTkx1DvDRpDvXKKjZ3X33oW48mthSEVgv+emkRmLCpPZSEUEhRU6woHrg== Received: from [172.19.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id CCABD68EB43; Mon, 22 Sep 2025 22:06:09 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1758567968; b=j0ma05Aki5JNuwCAIKdxHT/2fLv9uQQe8MuMcfzgzYdksXUNCOPZWlVv4OMz8xRyrZkso JISZpPS+yUi98i9i8HxhwbC1ajS03tRN+Qee4HDC2wD3H8WGMeT2w7ltrKUa4ipd9z3hG2+ 9wwbyIVtAUGVvR1Q6Awar+oOIohHTacULRT7fVca3ozSIDiCk0dc35zWS2LDGpjuYS44fj3 S2Ix+vG0wvSrW7DNUFIryAQ+22xKqeJ6yIeUi9QAV70G9tEVWiSoDOu7UR/Pp+lo9NrknZ8 zA8zXY4jebh6jtdU/nsVnw/drHrAxTgBPg8UfZmGwOzKYdYRbOiPPHGPcIzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1758567968; 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=thkmDEgGFxP+FRsvnOwPTonBP3xFf8uAhgFROjKbjY0=; b=gkrTKbN+Ui2jVZOnClKuMeEyb56eTZtF+7kub8DaNEIc84AVXYI0ZW58UAaxjSEnD55bP r84eVslpanvAE3kMy3+UgItQQS9FHH00DoPrxko/UWfcsQwLxB+M7e65dkjjzcb9EYhNEXR bTvlKOh5hPci4pMTz4eHzXHBJNOApykKot4yCamT1lj33F8pGoDgZt06GgESO5oXOjXea1S 7A9kcwQmJakRhfcuF+SfmSBQyrHIvkeEzfxKDdGRm6CdC911BOfaG9PqpJVAPoOGeS0BvCF pY+16lrMJTrxLxsPzAlEd07y/eAT6fU3lx4SHDkOH9r+aVvbKOxkhxap4BLg== 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=1758567958; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=6joT9ABL2FgfoIFeZ3wRV4lDV/ZWJ4Ku9PL/KncXCSg=; b=0pWf6NE9t6HwI9naY3aPVUyx0mfBdgGmrmi9F+UFF+rp3+ITQfgcFmDRPa7yxZigYJFh0 FDE/OPZdeOFrxNjLrg5+0REfynPncqkZKaDwfiROLdTnh+hdvSSTlgKX+/mqH7e9mIz1Lb7 LnGla0Uq3f0W93i5dQ1FJ3Tz5goyg+IED7Ng12SceN6KSLTF4FxfHRcDywv6DyEh8CGaSUP Gb/K1RjBUjoe5+a4v0FuTQNm9P8AldFXK9dovnXX9PZhATmDqXl1YfT74EkBfc3SUwLzwUq 39snuP5gZO2j1jiqEtufSIjSx+p42MkuABgpBLmHLXG+vz0h9V3zjIxXoGpg== Received: from ed19c606a818 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 7D8F768EB08 for ; Mon, 22 Sep 2025 22:05:58 +0300 (EEST) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Sep 2025 19:05:57 -0000 Message-ID: <175856795871.25.14426877081704556502@463a07221176> Message-ID-Hash: 4DBJF2UIKLXQMOBSUBHKEAIDFZNKAB2G X-Message-ID-Hash: 4DBJF2UIKLXQMOBSUBHKEAIDFZNKAB2G 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: Merge tts after building index for old-style uncomrpessed PCM (PR #20578) 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: Derek Buitenhuis via ffmpeg-devel Cc: Derek Buitenhuis Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20578 opened by Derek Buitenhuis (dwbuiten) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20578 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20578.patch This was a regression introduced in 292c1df7c159c8a1a7afe52613d164ff417e81ce. Since we don't know the length of the stts data until after building the index, since we're generating it, we need to merge any ctts data after, since otherwise tts_count is set to 0, and no packets will be output. We can't remove the merge entirely, because uncompressed PCM with a ctts atom is technically valid (e.g. a constant CTS offset). This fixes old-style uncompressed PCM demuxing. >>From 605603fb243229c41d3994ae500fde58cce037f0 Mon Sep 17 00:00:00 2001 From: Derek Buitenhuis Date: Mon, 22 Sep 2025 20:00:54 +0100 Subject: [PATCH] avformat/mov: Merge tts after building index for old-style uncomrpessed PCM This was a regression introduced in 292c1df7c159c8a1a7afe52613d164ff417e81ce. Since we don't know the length of the stts data until after building the index, since we're generating it, we need to merge any ctts data after, since otherwise tts_count is set to 0, and no packets will be output. We can't remove the merge entirely, because uncompressed PCM with a ctts atom is technically valid (e.g. a constant CTS offset). This fixes old-style uncompressed PCM demuxing. Signed-off-by: Derek Buitenhuis --- libavformat/mov.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 216c6a5442..7fe4678234 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4841,10 +4841,6 @@ static void mov_build_index(MOVContext *mov, AVStream *st) if (!sc->chunk_count || sc->tts_count) return; - ret = mov_merge_tts_data(mov, st, MOV_MERGE_CTTS); - if (ret < 0) - return; - // compute total chunk count for (i = 0; i < sc->stsc_count; i++) { unsigned count, chunk_count; @@ -4939,6 +4935,10 @@ static void mov_build_index(MOVContext *mov, AVStream *st) chunk_samples -= samples; } } + + ret = mov_merge_tts_data(mov, st, MOV_MERGE_CTTS); + if (ret < 0) + return; } if (!mov->ignore_editlist && mov->advanced_editlist) { -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org