From patchwork Wed Feb 2 00:13:00 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: 34061 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a10:6681:0:0:0:0 with SMTP id b1csp1023740pxu; Tue, 1 Feb 2022 16:13:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLUc6CHfzG4jjpynxUA6Ot4jsC6SZGocLVjYI7ahOV1zOQTEWYVr9F/cSlmxeOGGkS5QEe X-Received: by 2002:aa7:d6d4:: with SMTP id x20mr27699576edr.307.1643760828186; Tue, 01 Feb 2022 16:13:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643760828; cv=none; d=google.com; s=arc-20160816; b=peheLDwTbGvWMFdw2MXTeKP+r7yQfYsoU1Mq+vDH3+f2RNvm8og3n9UFDa+gZ1ZtzL XHH7V2/LBI9vZ/trpBc7dJNjKYaVyssOff1wnQ/sEDiX7R5uAW5bs0oSJmGsMLKQ0guS UzgmNfLvEyzfzWs6a/VhP/URo3px79m/nYepUD1AetMouVF8KYixYWVqjRUxPnSfABk6 prDWHbWUJ53VZuxYwb3D7YJIyaHhkPCemRPLw+Iu5NHTj6OszFgi8BkUCtg6om/Id9Bl YF3V3oNcj10nqDV8qEO56qg07Qr0fYzjryyfMq5MUEcOwHUXasYtUvk29Xzay3Nh6Ynx OSnQ== 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=Fbhs8q02h4yHuAlsILtBVwSe1P/qaVfDwdi6SHopvxvYu8IMN9rTHGNZpZjY7F0Gzw SC8m6x0DsvHY16i5x90rOQnjiusCya8lkOw840SyxfOzjyhyCgrMaKEPZFdCtAXEGNBM afRqKaXn0c0RerEfSHBufiWB4OphogujaXX9DlKk2OML5Rcrbztnb8Vp54IrG+WHh912 54lYPkQKLYV8JsnT79vNeTEdCizPLFJ3KDI2k44v+r0Kax7qa/acLqC2tBgDdvvSEjaN 9rO3MDwMjk/xeTUVeyzgIkA4KYFAZIbPbBbPfBmy57nUCWj6xuvHGEb5VUJyj0bgYihv 0Luw== 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 b65si10514619edf.281.2022.02.01.16.13.47; Tue, 01 Feb 2022 16:13:48 -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 B46AE68B2A7; Wed, 2 Feb 2022 02:13:35 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6FA3A68B265 for ; Wed, 2 Feb 2022 02:13:29 +0200 (EET) Received: by mail-pf1-f169.google.com with SMTP id e28so17325404pfj.5 for ; Tue, 01 Feb 2022 16:13:29 -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=4vAlig9G21fK67s6b+ZBCrF4vJcFJlQm+47PiELEcIcCTgeuosdY9ZeoikccRURg5T A+70jA12v46FSYuhk/y7sNjuoA1r1LFfgJhiIA05JgK8MI4l/2W2pRZhDZkC8O6Y4u3R LR8gCg5icGnujm/CGv0StXed5Tylir0IcFx0TzVU0myt1LFAOq0hKBXDsGlODBm/VZsR BwydgW4kfsUeb1LrUwm8MHbzw3T+Bv0KyQpVtZ0J7Z9uO1ai7/Dd3IDtqr/rB12Y7OpQ ZQMgRS+UUYH+Cvqpmrf1jDTSWpVelspI7u+AJEZSOWuMApElrUQZGSO3DfHQaJ3jqVC8 Q4Ww== X-Gm-Message-State: AOAM530kols0ykOAQ8p/wrozQJzzLT+/YHbo4BarucvpUuyzEbfQBWHB 7pI+vbsaGWsireCV89GyIAmQx7WQoIM= X-Received: by 2002:a05:6a00:23d3:: with SMTP id g19mr27179899pfc.27.1643760807292; Tue, 01 Feb 2022 16:13:27 -0800 (PST) Received: from localhost (76-14-89-2.sf-cable.astound.net. [76.14.89.2]) by smtp.gmail.com with ESMTPSA id j19sm12532794pfd.125.2022.02.01.16.13.25 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Feb 2022 16:13:26 -0800 (PST) Received: by localhost (sSMTP sendmail emulation); Tue, 01 Feb 2022 16:13:14 -0800 From: pal@sandflow.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 1 Feb 2022 16:13:00 -0800 Message-Id: <20220202001302.4430-2-pal@sandflow.com> X-Mailer: git-send-email 2.35.0.windows.1 In-Reply-To: <20220202001302.4430-1-pal@sandflow.com> References: <20220202001302.4430-1-pal@sandflow.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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: T890sa7s0vWQ 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);