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 13D3D43414 for ; Mon, 11 Jul 2022 22:25:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CFC9068B7F0; Tue, 12 Jul 2022 01:25:25 +0300 (EEST) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C775A68B632 for ; Tue, 12 Jul 2022 01:25:18 +0300 (EEST) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-31c89653790so63380727b3.13 for ; Mon, 11 Jul 2022 15:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=HzhVvuXkr18hbiwUO3h/E5e8XhLFTylqzDOxVSzNlrY=; b=KGyYw8gRkYaPaVQefYPe9JJg3py/simBig4EctXnVWVtOe/iUJ06dsj/U+u0gIHzFM IXP+VKpqZvYwR+XPrYr7cmUGeaEbsbGb3MgyTh6hxArs1zXoVs41342sLTVXXeBKgA4u UnvijKxWuNVQXVMEVN09zypQvLvYinc55ZLR1Ydq1Cb5i+YKOKM7RVJSPGCn/jkdToYh GQPlnYzt6We98m3lctng9W4NDvZgTPq+uwcevT0g0xzDLHcKQtOkueEZ7Xg1oKiZriLM BVWB3h2Q/o8KbFSY8lqvbNB41ilG5mitAqZTjOt2IU+dUae8Qs91CWijT6oPrrSdE4An lFIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=HzhVvuXkr18hbiwUO3h/E5e8XhLFTylqzDOxVSzNlrY=; b=NDT3YG7t44AWqLksbGPMZX37QC0hZVQMnCLYqztIwtsBbhy3s/25S07Hcl5MkX3dGT xKW29h91v9+czb8ar/rLq5tMyrCos2K8LsF+wshAACk+71AHuXrdzWeEfq4jflgab1zP eTrQpPZNweBnmWsj1ZO3cOcBN992IOHnV326QFeQ085s3i56V2FrRoBjjb4GVsDfrlDl SpZjJqiCqMHPHwJutPNbg69buXn8IcQVZ1XyNbt27WxXozoWBjRpCcAmKBtOlCG8MI3N IQqSzR9MnInMo4/nKage2R7TpmGAMJiijs8iJE6z6d95abAg2LtZb46NOMVpQPfkkb79 AXWg== X-Gm-Message-State: AJIora++ylkrhAkZQV1e5IyYm+tXnZveRMTyuxfHFwAPvc6oqGDq9fp8 2yTqN68iSZkQp+0YqmNxZqmSbNKdKiIo5Mg4jc1M7Tulxbp+cg== X-Google-Smtp-Source: AGRyM1tGAFPbs62K2qKlEcKFR/k6QlaR/XHa7vkpU7URcsr6iiqJ52wiLzSHNUw2xrqLFbaq9zaDUMhAu1rq2ctBK/g= X-Received: by 2002:a81:78d:0:b0:2e5:d440:d921 with SMTP id 135-20020a81078d000000b002e5d440d921mr21744299ywh.251.1657578316798; Mon, 11 Jul 2022 15:25:16 -0700 (PDT) MIME-Version: 1.0 References: <20220630210434.1551769-1-vigneshv@google.com> In-Reply-To: <20220630210434.1551769-1-vigneshv@google.com> From: James Zern Date: Mon, 11 Jul 2022 15:25:05 -0700 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH 1/2] avformat/mov: Rework the AVIF parser to handle multiple items 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 Thu, Jun 30, 2022 at 2:04 PM Vignesh Venkatasubramanian wrote: > > Stores the item ids of all the items found in the file and > processes the primary item at the end of the meta box. This patch > does not change any behavior. It sets up the code for parsing > alpha channel (and possibly images with 'grid') in follow up > patches. > > Signed-off-by: Vignesh Venkatasubramanian > --- > libavformat/isom.h | 4 ++ > libavformat/mov.c | 148 ++++++++++++++++++++++++++++----------------- > 2 files changed, 97 insertions(+), 55 deletions(-) > > [...] @@ -4692,9 +4755,25 @@ static int mov_read_meta(MOVContext *c, AVIOContext *pb, MOVAtom atom) tag = avio_rl32(pb); atom.size -= 4; if (tag == MKTAG('h','d','l','r')) { + int ret; avio_seek(pb, -8, SEEK_CUR); atom.size += 8; - return mov_read_default(c, pb, atom); + ret = mov_read_default(c, pb, atom); + if (ret < 0) In some other cases these two lines are combined, if ((ret = ... + return ret; + if (c->is_still_picture_avif) { + int ret; + // Add a stream for the YUV planes (primary item). + ret = avif_add_stream(c, c->primary_item_id); + if (ret) This could be updated too and use '< 0' to match other code. + return ret; + // For still AVIF images, the meta box contains all the + // necessary information that would generally be provided by the + // moov box. So simply mark that we have found the moov box so + // that parsing can continue. + c->found_moov = 1; + } + return ret; } _______________________________________________ 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".