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 5F9B34B759 for ; Wed, 21 May 2025 13:23:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 4F1D268D86C; Wed, 21 May 2025 16:23:24 +0300 (EEST) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 75ACD68D820 for ; Wed, 21 May 2025 16:23:18 +0300 (EEST) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-3a36efcadb8so2763506f8f.0 for ; Wed, 21 May 2025 06:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747833797; x=1748438597; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=f6zu2GoJ/6gf2BlgvoWH9iDxVMxGSO1m9+IRTan0EE4=; b=hpYEzOYW0EnkbFEcpFOJM8Udzs+fDTr73hl7JfE3y4xkQ6AaXI90zw2Hs8TBvLGnS+ DERF/ruUbJ3hwgwQnR/Egegq0h7rEoJwOuZQK3VxEVW/uDkA/MQe3sh6m65zsKCfh/4A //JqcEckjzXZe3pQhwQvflzgCBRiKljL4eeNBSQRe/u46X65tR+j1v35PtLgjn5/UC3h OlVdle2ERss74c2Np7PBwMP14ZJ3UCgKKiktbnpW3CoNbB2krSn60lMEj/QCxVEjXqs1 zM4iJxhQ/A3R/x1qFI8+MkpfobAesDB7d3TC/EzqQVjdTFtbxcIpBJ82EL4PR4iNGaUl i/Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747833797; x=1748438597; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=f6zu2GoJ/6gf2BlgvoWH9iDxVMxGSO1m9+IRTan0EE4=; b=v9EDiZoqQs8L7tnCvMoQIpWUgqkyfVB3Tu7vluwe5DTWo9pHnx0GhShoigRI3ACRuU 6ryFwFY2v85QPjaJsGcjhPvFIHPW02Wy+6Dy7oa9r/atZAaeSoG4tza8vs/+6/1/mCDS p7c3eSPpGTk+ycFc3/DzTNntvUO/QB3N2cz8pJfdC3g/0g1nEiKApExzQUReo2PVjVKQ v8ggN/ajZJXwQH1za4/4Vyq6uRL5QeNdNrUBbu3jJ7HihYDO3Gky/r/MXk61vqRL1A0t OecP36Ud3XeseKxmETPmw2BooIO8Fferurahk5lJ9dXp6GtQa/RMykk1EhgH7SKQ5/zu ZMnw== X-Gm-Message-State: AOJu0YyWwxppVo6Cv2RFHsdK+wpjQtamNTYwrd7VAVPyFKf3v+EYgo40 J9JhkVx6vwxS7PlzQQI/ltfZh4AIfsvaSPJm87UThwVQ8f8GpKvx5aUM8oL+Jw== X-Gm-Gg: ASbGncuhTUPtdsSNnDI+XGbe1TLquDVcZI9i3b1FXOhS34HQ6oYjJHkAybgTnJ4gt8G +y4E8T9kERypj0aXDa/7u7Ku1z2HLBlEAciJHsDPmEn174fXq3iHdoPUI9Cul8Xu8mY2evCS3HW Yb5gfsoPaic71fgpdF99ZnvbFOAKl9eF8j+KKyGFHE1/nxf1ctUVDwHIhZvcDANdDXT06lRccCz ULARI+y2osSD1WvtSpBRjOUbaeob1X/Dx+ANNZZewWDkIVYiaKBX9qC4wfT80Mu8aJtlCPcfIZJ snwd7U6GimphkhCffM0PJyCE7nd+TMnzCuM1evuCkwDDH1QnLFsYZQ2uo2glIRtHvUMDTcMhQ2f X0lIbhvN/H1djk9q5tW2289U= X-Google-Smtp-Source: AGHT+IEvaTo3y9OUC1dkT34SUianN/42T/pplUuWdnbHcHYjGyqGYinMgMIIE6q/V6ldhlLLbTqunA== X-Received: by 2002:a05:6000:40db:b0:3a3:75d7:5864 with SMTP id ffacd0b85a97d-3a375d75a43mr8119707f8f.47.1747833797186; Wed, 21 May 2025 06:23:17 -0700 (PDT) Received: from [192.168.1.106] (33bf1e4c.skybroadband.com. [51.191.30.76]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3a35ca88985sm20042168f8f.63.2025.05.21.06.23.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 May 2025 06:23:16 -0700 (PDT) Message-ID: <10672112-3865-498a-acc8-7bfd76779217@gmail.com> Date: Wed, 21 May 2025 14:23:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-GB To: ffmpeg-devel@ffmpeg.org References: <20250520152717.15343-1-derek.buitenhuis@gmail.com> From: Derek Buitenhuis In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v2] avformat/dhav: fix backward scanning for get_duration and optimize seeking 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: On 5/20/2025 8:18 PM, Andreas Rheinhardt wrote: > The only thing that you want from parsing the end is the end timestamp > and this is given by data alone. date is a 32bit le number at offset 16 > from the start of the dhav tag; it can be read directly from the buffer, > so you do not need to seek again and use read_chunk to get the end. > It also means that your ffio_ensure_seekback() is unnecessary (unless > you wanted to ensure that the seek back to start_pos works (which is > currently not guaranteed at all and not ensured by your code and would > probably also be bad in general given that this would cache the whole > file in memory). Thanks for the review, v3 sent. > (The above is based on the presumption that we are not really interested > in what parse_ext() may parse in the chunk at the end; I don't know > whether this is true or not.) AFAICT, we are not. Cheers, - Derek _______________________________________________ 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".