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 3E39F496FD for ; Thu, 18 Apr 2024 15:29:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5040568CF59; Thu, 18 Apr 2024 18:29:43 +0300 (EEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 301BD68AFCE for ; Thu, 18 Apr 2024 18:29:36 +0300 (EEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1e853131a9cso6715165ad.3 for ; Thu, 18 Apr 2024 08:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713454173; x=1714058973; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=Vk1NAPkJjf/ECc+ew6GMNAQNXCiJYYWGmfVFsbP1U1o=; b=B1C6JP1EeXZwvbs/0/NqvBSUDQgCcW+Kknjo0dRedo8oWUoaidUukPbcfjjaHtCQRS oMh5JmEgVxza4FIrHA63BCcemCUbpr/4RvSLAFRQXpeOvV6td+Eanym6jwz6y1ZmCBSq Nfkf9FTF8uP8/jkhx0yOaklq9j4aPMpstemdl+2s0oF7uOZmkCILHdv4ogzgK8rz/usm 1fznnkj7bMBm1rYfl5vGMGGxOmihiP6yPvjxcY6/mzmAE/21GabjaffOYIoX6uekcPCm sLUQ1VOb601TQg7JnlRyYXaJxOS8UUAFt7WfB4LO9Cs7hL9EKzz/uEDK8w5MU0binTwi vpvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713454173; x=1714058973; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Vk1NAPkJjf/ECc+ew6GMNAQNXCiJYYWGmfVFsbP1U1o=; b=enpCOFrtgM5aNSUSzJ1+mXFTUc+Ema0hNy1HclsbirPKRTMRI348ekm1RZ/EQaDmKX eXLHIFfCiL4BwRv00Rm4nZKUxx5xI5OfHYFS8i09T41UtHDOkmE+1TIjBap8o6oMa1/L y1yiWiwSB3zhg6482HeRLzuruBfLkwnId3MPwM59AXrhl4DgzllghFUIAUBrh17taWKW wGZEF94KUTxk0aCX69EH4pCxA6/0QiIGv60kqv3LWWInZQy2rGP3TDz2oXR/3nJPZTf+ u0nqTfO/vGyEUD2w071k8NZfbfVtETUuQ2XK1x8npNocVoJj7ODPZfw5PDf2owGdsQxz +JFg== X-Gm-Message-State: AOJu0YwaD+YYsxMOxRxiCXPe5j1NYiKKreO0Bgu35DI6d70AWI9N9BM8 MJyV+NHsJnijvWL5BCpDSrx6VjMkYhAr2uH3c9ADwzTGKeTmQCGBxK23LQ== X-Google-Smtp-Source: AGHT+IFKShwnvzohefJ9f+gQGS9azHzzZxKWceo9crsBftIVa1YT6htdHuVke3Xq04eutDtLLrMTqg== X-Received: by 2002:a17:903:240c:b0:1e4:514a:55af with SMTP id e12-20020a170903240c00b001e4514a55afmr3712227plo.68.1713454173352; Thu, 18 Apr 2024 08:29:33 -0700 (PDT) Received: from [192.168.0.10] ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id j12-20020a170903024c00b001db66f3748fsm1658505plh.182.2024.04.18.08.29.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Apr 2024 08:29:32 -0700 (PDT) Message-ID: Date: Thu, 18 Apr 2024 12:29:32 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: James Almer To: ffmpeg-devel@ffmpeg.org References: <20240413131103.2693-1-jamrial@gmail.com> Content-Language: en-US In-Reply-To: <20240413131103.2693-1-jamrial@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH] avformat/mov: ignore old infe box versions 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 4/13/2024 10:11 AM, James Almer wrote: > Some files with no image items have them, and were working prior to the recent > HEIF parsing overhaul. > Ignore such boxes instead, to recover the old behavior. > > Fixes a regression since d9fed9df2a9e70c9375d3b2591db35c09303d369. > > Signed-off-by: James Almer > --- > libavformat/mov.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index 0c892b56c8..160e0b14fb 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -8137,8 +8137,8 @@ static int mov_read_infe(MOVContext *c, AVIOContext *pb, MOVAtom atom, int idx) > size -= 4; > > if (version < 2) { > - av_log(c->fc, AV_LOG_ERROR, "infe: version < 2 not supported\n"); > - return AVERROR_PATCHWELCOME; > + avpriv_report_missing_feature(c->fc, "infe version < 2"); > + return 1; > } > > item_id = version > 2 ? avio_rb32(pb) : avio_rb16(pb); > @@ -8209,6 +8209,8 @@ static int mov_read_iinf(MOVContext *c, AVIOContext *pb, MOVAtom atom) > ret = mov_read_infe(c, pb, infe, i); > if (ret < 0) > return ret; > + if (ret) > + return 0; > } > > c->found_iinf = 1; > @@ -9508,14 +9510,15 @@ static int mov_read_header(AVFormatContext *s) > av_log(s, AV_LOG_ERROR, "error reading header\n"); > return err; > } > - } while ((pb->seekable & AVIO_SEEKABLE_NORMAL) && !mov->found_moov && !mov->found_iloc && !mov->moov_retry++); > - if (!mov->found_moov && !mov->found_iloc) { > + } while ((pb->seekable & AVIO_SEEKABLE_NORMAL) && > + !mov->found_moov && !mov->found_iloc && !mov->found_iinf && !mov->moov_retry++); > + if (!mov->found_moov && !mov->found_iloc && !mov->found_iinf) { > av_log(s, AV_LOG_ERROR, "moov atom not found\n"); > return AVERROR_INVALIDDATA; > } > av_log(mov->fc, AV_LOG_TRACE, "on_parse_exit_offset=%"PRId64"\n", avio_tell(pb)); > > - if (mov->found_iloc) { > + if (mov->found_iloc && mov->found_iinf) { > for (i = 0; i < mov->nb_heif_item; i++) { > HEIFItem *item = &mov->heif_item[i]; > MOVStreamContext *sc; Will apply. _______________________________________________ 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".