From patchwork Thu Feb 3 04:07:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Anthony Lemieux X-Patchwork-Id: 34089 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2c4e:0:0:0:0 with SMTP id x14csp2133468iov; Wed, 2 Feb 2022 20:08:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPSqU4/vJFf3RvIZh+3qXmulN78q4CU5qZSZ+8x7ty6vEljOrdFpArp0TSutN5AwVr0hX3 X-Received: by 2002:a17:907:7251:: with SMTP id ds17mr28120702ejc.151.1643861325372; Wed, 02 Feb 2022 20:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643861325; cv=none; d=google.com; s=arc-20160816; b=Gr/Ttes9u6JJ6W/Xx2UhvxE5zq/Ut4jkVrx6mu1yV+xF4DmTh769PT9Nm7CgGLbftP pFz44ELae44x4S/4u7fmCRmz5rUJTAWhS1x/ayKlD+ozg5PFJClzcg3vxog/PQlEtvLV RML35MvAA//1lkh80boiZOp64mVfEydAyXqgvkzGzDwUmEn2TMkGydWKFYTdaXNHkH/D tFkgkzvMhYlsoIgo6Xdr3gcrnu00G4OUFLie47ZE06KkYTwBC8KClRi2NOC325jHojsB 6hM5/LH7KFNLU753fesxlKs/zytALghfMesvTsgZndD2fvctsL2YYH5TvYMZUxttSTrs dWwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:delivered-to; bh=fuPjymneHfKVoXgBt4+QtlDKzLJWRsUSsYyeuIwE/tk=; b=cUhPSY5nath5+8tUmKXi+ho7x5vcgZk3pWXLxaJqhxeVBfwPY7kocgNZo060+NT9YN h58BSx76WGYfy6gjECS1gbEBisnGMh6omG6do5RkTBUzu+9mStiSZI8bRrCSUNWf4mrY fZD+eURcRRGKRpDTL5HS4feIj4aihoOo3XgoTfu4KxkeewpfLKbhntrrlhl2SSM15yP0 TNlt2x5+22LcmkZDA842jnEs9xeDbw/Kw4YAzMu5PPXYhTpR0Vz4Y1p1tr80/JqcUUZ3 IFaDjBlO3UqtCFOMwT+TamljyCf4c/r7diKCVApQbt576ra7DIDHqvsxE1r+L/GngDTk CkPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p26si11559787ejn.336.2022.02.02.20.08.45; Wed, 02 Feb 2022 20:08:45 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B16C668B1AA; Thu, 3 Feb 2022 06:08:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A05CF68AFEE for ; Thu, 3 Feb 2022 06:08:35 +0200 (EET) Received: by mail-pj1-f43.google.com with SMTP id d5so1262366pjk.5 for ; Wed, 02 Feb 2022 20:08:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=64XwETk71LJ6Y7sWuZnNEgO3/A6mTDbnorGFhpK7uA8=; b=4oDIzpnEChpvKkP9eWgio0MAc55Qkj+FWkGx1MEo/UH7jwvHYwlxbkbayYDTQRqiCB CvQ8ugtSz/COKjbdEKv2Gr4lWTRaElQIGQV514oAXFFvsRwDsPy0YRU1XfOgEYn1+NqR 548cMt7/SF6om1Zj5D2sgFS1+L99UK1A20vT/A7A4JBwhL3WXCukiI8JH5QPKmCEswJz Mi8eHafoquxV24NhnGwEMg0Xo7lqlssLuEtwwFOQo54w/svSnLA6Hay8lwBRn1pHOmab yh9a8BLWvhKYUbbGzLPzz041rNcI+GRJ6iVwX38p8tTaNPKlgKOhQnEvB43l26QW3K79 QC/Q== X-Gm-Message-State: AOAM531PkouvUmoz86EsPGH03XoxXNab99P9HVau6nPgQL3Cx1N7r2jw WukfNMBSPPx6C21mteq+05wEt5UCqQ0= X-Received: by 2002:a17:902:e806:: with SMTP id u6mr35215305plg.10.1643861313698; Wed, 02 Feb 2022 20:08:33 -0800 (PST) Received: from localhost (76-14-89-2.sf-cable.astound.net. [76.14.89.2]) by smtp.gmail.com with ESMTPSA id 16sm23951968pfl.99.2022.02.02.20.08.32 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Feb 2022 20:08:33 -0800 (PST) Received: by localhost (sSMTP sendmail emulation); Wed, 02 Feb 2022 20:08:20 -0800 From: pal@sandflow.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 2 Feb 2022 20:07:43 -0800 Message-Id: <20220203040745.10983-2-pal@sandflow.com> X-Mailer: git-send-email 2.35.0.windows.1 In-Reply-To: <20220203040745.10983-1-pal@sandflow.com> References: <20220203040745.10983-1-pal@sandflow.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 2/4] avformat/imf: fix missing error reporting when opening resources 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: Pierre-Anthony Lemieux Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: gsC3Zhx5yMcK From: Pierre-Anthony Lemieux --- libavformat/imfdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c index e6a1020ecc..658ddc40f2 100644 --- a/libavformat/imfdec.c +++ b/libavformat/imfdec.c @@ -550,7 +550,9 @@ static int set_context_streams_from_tracks(AVFormatContext *s) AVStream *first_resource_stream; /* Open the first resource of the track to get stream information */ - open_track_resource_context(s, &c->tracks[i]->resources[0]); + ret = open_track_resource_context(s, &c->tracks[i]->resources[0]); + if (ret) + return ret; first_resource_stream = c->tracks[i]->resources[0].ctx->streams[0]; av_log(s, AV_LOG_DEBUG, "Open the first resource of track %d\n", c->tracks[i]->index);