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 6917B458B4 for ; Wed, 26 Apr 2023 17:53:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D12B668BF2A; Wed, 26 Apr 2023 20:53:22 +0300 (EEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4EB8E68BBA2 for ; Wed, 26 Apr 2023 20:53:17 +0300 (EEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-63b5c48ea09so6127787b3a.1 for ; Wed, 26 Apr 2023 10:53:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682531595; x=1685123595; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6pM1a+86JdLKKTRCP+D7WZrgjTv/9n73ATBKIlJzXZc=; b=ZNf2Y62A8e0iV9MYqy6jlog3UzicfiyRMm1ycnZxc95dol2DKIMFkojWgc6ldT4UIA 4byt+G7PFun+uG6Qe/0s+5dB5kC1YPbriPPsMY7CrtIjCc1rkmgz+Rbzj5arfTISn66o SocIf0eMUefEc2RgTtl+VydWRY68AxeOGk+0VPYO3sOm6vq7ytWW3aEq7nWHpgADI8LQ nRx88Ff8fL6Tum1YDUSse9JYc76NiJCkAnMhXNkcC+8Q7bmagDXcAcc+CgeywA2xcair u+iWRwsspkM/QAKPglECcTIzzf5H/UsSyuPP3guudBZ78CVbRL4OmOQIB7dzKfDLdUHl KCxw== X-Gm-Message-State: AAQBX9ff/ZPG1EKmru9VgGXMqiDftNBNEUu+yeZ+CsHIUs7DgfKw34xW FqLLnd39kojnlR1mnAlKjIbzR9wiWdU= X-Google-Smtp-Source: AKy350ZvIH1ZENJKshVgYr9BHQksWFjxztcW+CbOBSAk8geFA87z8MexYbWVUxwiG3LglcPjrqChSg== X-Received: by 2002:a05:6a00:1a01:b0:63b:89ba:fc9c with SMTP id g1-20020a056a001a0100b0063b89bafc9cmr27797452pfv.27.1682531594968; Wed, 26 Apr 2023 10:53:14 -0700 (PDT) Received: from localhost (76-14-89-2.sf-cable.astound.net. [76.14.89.2]) by smtp.gmail.com with ESMTPSA id v16-20020a056a00149000b0063b7af71b61sm11550456pfu.212.2023.04.26.10.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 10:53:14 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Wed, 26 Apr 2023 10:53:07 -0700 From: pal@sandflow.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 26 Apr 2023 10:53:01 -0700 Message-Id: <20230426175302.946-1-pal@sandflow.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avformat/imf: fix invalid resource handling 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 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: From: Pierre-Anthony Lemieux --- libavformat/imf_cpl.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c index ad84a68b13..a7cf5fa360 100644 --- a/libavformat/imf_cpl.c +++ b/libavformat/imf_cpl.c @@ -608,11 +608,10 @@ static int push_main_audio_sequence(xmlNodePtr audio_sequence_elem, FFIMFCPL *cp ret = fill_trackfile_resource(resource_elem, &vt->resources[vt->resource_count], cpl); - vt->resource_count++; - if (ret) { + if (ret) av_log(NULL, AV_LOG_ERROR, "Invalid Resource\n"); - continue; - } + else + vt->resource_count++; resource_elem = xmlNextElementSibling(resource_elem); } @@ -691,11 +690,10 @@ static int push_main_image_2d_sequence(xmlNodePtr image_sequence_elem, FFIMFCPL ret = fill_trackfile_resource(resource_elem, &cpl->main_image_2d_track->resources[cpl->main_image_2d_track->resource_count], cpl); - cpl->main_image_2d_track->resource_count++; - if (ret) { + if (ret) av_log(NULL, AV_LOG_ERROR, "Invalid Resource\n"); - continue; - } + else + cpl->main_image_2d_track->resource_count++; resource_elem = xmlNextElementSibling(resource_elem); } -- 2.25.1 _______________________________________________ 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".