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 5C19344E3D for ; Wed, 28 Dec 2022 03:20:22 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 204CA68BC56; Wed, 28 Dec 2022 05:20:12 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D711368BC0F for ; Wed, 28 Dec 2022 05:20:05 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 51AE9E8410; Wed, 28 Dec 2022 04:20:04 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HgddK4zyLgbX; Wed, 28 Dec 2022 04:20:03 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 25699E82F8; Wed, 28 Dec 2022 04:20:03 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Wed, 28 Dec 2022 04:19:57 +0100 Message-Id: <20221228031958.26570-2-cus@passwd.hu> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221228031958.26570-1-cus@passwd.hu> References: <76674b9a-30ff-a43-6d51-8c74dca8fa@passwd.hu> <20221228031958.26570-1-cus@passwd.hu> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] avformat/mxfdec: support Avid files with an extra index entry 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: Marton Balint 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: Marton Balint --- libavformat/mxfdec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index ad4ee15570..2e61e77d67 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1991,11 +1991,11 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta int index_delta = 1; int n = s->nb_index_entries; - if (s->nb_index_entries == 2 * s->index_duration + 1) { + if (s->nb_index_entries == 2 * s->index_duration + 1) index_delta = 2; /* Avid index */ - /* ignore the last entry - it's the size of the essence container */ + if (s->nb_index_entries == index_delta * s->index_duration + 1) + /* ignore the last entry - it's the size of the essence container in Avid */ n--; - } for (j = 0; j < n; j += index_delta, x++) { int offset = s->temporal_offset_entries[j] / index_delta; -- 2.35.3 _______________________________________________ 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".