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 270CC4C2CE for ; Thu, 31 Jul 2025 15:34:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id EB88968CF0A; Thu, 31 Jul 2025 18:34:21 +0300 (EEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 0B47E68CDE8 for ; Thu, 31 Jul 2025 18:34:16 +0300 (EEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-76bc5e68e26so1307666b3a.0 for ; Thu, 31 Jul 2025 08:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753976053; x=1754580853; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=x5qYbcB1cEARA3VoBnXh8ryMz7pL6TAJwt6PPjYu/4w=; b=KAyLPhTqhY3PSVgqg5/WGePi05G1ZtFYybe+vDPUazIc87vlxerMdj3mH1JDDRb3pf LQXx5Eeg3c3P3uLS2MQb3Fuwbxc/XTynek95lQFZUIaCxmWF29LKPadv1UpPP0sK5yfD 5ENnZdYAiEN6i47XxYG8MzKGXUS/HY8xauK3rgMYFbm0hLAtL+fomA3OvD4+Hpw2gRsc egF/AbONMCO9QJ6cVZDl1qVqkTh32deZUDC4QsICt/u8hxpCdjP/NgbId/y9hC10875h xBlhzMuP7z7SZLLyQaokUCsGCNi/uvJD/AlP4hUfABkvJztrt2Sqd+ky/zrc7HzU6AmS 5IOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753976053; x=1754580853; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=x5qYbcB1cEARA3VoBnXh8ryMz7pL6TAJwt6PPjYu/4w=; b=p0ml7KlDrdq8cGW0WegGeGVaSn+zybbI6UlgzRAyA/Wn0Dm0dEQPA2RwgXns+ePfS6 InU5RE2NaNxwcSu9Zlp+JdxwX0g5pVr08aYzuf7KuGD3unhrNWypTBNJ4iEEXdnPmuaD qXUpMKETzYaKSjJ8dtBs4kCeJ5bMKXgiRlx0gl4830RtQDb9V/X3b9c5WIYy8sINrXKd 3Vu3xcsOT2jK/+3ycW/FeTFfozf0gv5sqzvKuvG5PmeubAp8OH4sW6X2bqexPzMNX1iD i2njObHWYnBSfh4cUn35/PlBgSZ/cIuGwKcuFiB8I9IiyK8h0VOENbXMRCW6LI6W/cyo Apgg== X-Gm-Message-State: AOJu0YxYjVzcWtKNUl1KVuJYt/Ngzml6g3lUDgZY8cWw2mA7RCS+zxA6 vUPxF99j+E5N0pIqnx18r0YW8UooT7gPPqyZ21USzfqlO5rnYda+fxuXurp0Tg== X-Gm-Gg: ASbGncv2KFoE3PCLCBA7DNnth8eL7tzYLEOBo9NOntLqAqHN1rSaUPK+jKiMpAhmcmS RdWmTIjHiDiwfKi6oNA5cwRY3yJPHIcfarvkpH08HT1NLcOr1iUO3UfNTxV72FqofN++nP0xyM1 /FrFPJsgMg6o+ahveZFdxt6DHVjTA8Bxa8SU3Uu40hReScIDB/6Pu0sQV4gDmpvPnZZc+B7Le5m D3M0IBbMitu6Wjmpm8eK9jLhX5+y15MYVpaqxu19Ff3ExZF8gXRvavN+aVwI5EVvqX475cYRFDh rpiRK1i0rv7rtwZ8IiFZUImulYt9dvDI/W0gsCFd5+ux1aMbKCj4Z9501AX0sPCf3G/YZo23qMK +X9Mx3Zolqzsv5sK+wRo7BzB3Uz2EP38= X-Google-Smtp-Source: AGHT+IFX85rc0M5DPGYL7v39FEcNU78fsaGQftKyHSPEppqDCkSplSXPg6d1ibwdtfd7UU3DI3TpIw== X-Received: by 2002:a05:6a21:339d:b0:218:96ad:720d with SMTP id adf61e73a8af0-23dc0cf784dmr10242934637.1.1753976052732; Thu, 31 Jul 2025 08:34:12 -0700 (PDT) Received: from Gryph ([2800:2121:b000:82e:91d8:21d7:8793:3182]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-76bccfe6bcfsm1935929b3a.123.2025.07.31.08.34.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Jul 2025 08:34:12 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 31 Jul 2025 12:34:02 -0300 Message-ID: <20250731153402.2079-1-jamrial@gmail.com> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/mov: don't unnecesarely replace extradata with the same one 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: If the first STSC entry refers to the first extradata buffer, then don't bother replacing the output stream's extradata as it's already set to it. Signed-off-by: James Almer --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 7f88ec8220..a3e1aa2933 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -10667,7 +10667,7 @@ static int mov_read_header(AVFormatContext *s) fix_timescale(mov, sc); /* Set the primary extradata based on the first Sample. */ - if (sc->stsc_count && sc->extradata_size && !sc->iamf) { + if (sc->stsc_count && sc->extradata_size && sc->stsc_data[0].id != 1 && !sc->iamf) { sc->last_stsd_index = sc->stsc_data[0].id - 1; av_freep(&st->codecpar->extradata); st->codecpar->extradata_size = sc->extradata_size[sc->last_stsd_index]; -- 2.50.1 _______________________________________________ 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".