From patchwork Thu May 20 21:25:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 27846 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp2810239iof; Thu, 20 May 2021 14:32:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytRn62JW5emNTab9WsjU1lXFSy+yTvkmRM/A+UBuR+CbvCwptUqWKD1n06Qnq4AyrvLmdX X-Received: by 2002:aa7:d4ca:: with SMTP id t10mr7159659edr.42.1621546346411; Thu, 20 May 2021 14:32:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621546346; cv=none; d=google.com; s=arc-20160816; b=KM3aCBinWIv1KRYvEprO4sV9BF2/n7TtDwHl8DbYwOq0sIymCvQdOm1jhN2AzdWwT2 CZkHhCznSntc44xy7/WnZFtCyzzJnuphXCakm/vKCK+aRAihe07NHg9gnv2wMIkQX8VZ OLnqiiE6BZ4OzRBLnDKs+2epIVlqTFXGKLJeoMfHi9W8Vz1av9jC5xdlAJd7YSWYkwU/ LlL/eBSjtAoOVUv+lR+8KoHT76xQHCBLNWNOTXctn93P9T4H7bhAnsT6CDmXrseb9moQ EyskkODT7lsc6vHoCOODlWgvjVN2XMWDFWaKNkNpJgxCN9uQSHXo445ZePEBv/dfq8K5 5GyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to; bh=zyDxBiRRr7XoNRBP0xNrvmJHAABFLO8KUh3olc8ZCQE=; b=qWtbcYgkyO30SDCs1cMCFU3Cd5h7CKwllnlcPiGb6JCWGJQ1x1quimjTgb9g13y/ps WWkYm8GZO3V7yGJ39EelOLPSYgmGHt02XJLf9PHA592/ypsxu3b1k/EtJ/hcyvyTNmJw dGsZ71qGcLUM/KzcsM06ophQku8wPJvBdInSeUmi1dqnm0olil+cDRb4E90oikl1346P 1aHWWLGPm6uuwn+oVGfR+I6fo4hi5+/1K8YlOZeJd1WrklvLhA5ObDy2Lfm/PmxKTRML 5K3wGAW5vSDFkZeb05CkRmltc/GaJ6qPvD90IGp51RQZwBfalnfQzedtX3RF6EaSmDMx wAtA== 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 o6si3843548edi.504.2021.05.20.14.32.25; Thu, 20 May 2021 14:32:26 -0700 (PDT) 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 BE2DF6882EE; Fri, 21 May 2021 00:32:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-2.mx.upcmail.net (vie01a-dmta-pe03-2.mx.upcmail.net [62.179.121.161]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CA52F680BE0 for ; Fri, 21 May 2021 00:32:15 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1ljqBu-00DRBy-0G for ffmpeg-devel@ffmpeg.org; Thu, 20 May 2021 23:26:50 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id jqAvlAbkTljeHjqAvlB0qy; Thu, 20 May 2021 23:25:49 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=BoHjPrf5 c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=KNVnL0KhTmAY2L2aqxAA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 20 May 2021 23:25:47 +0200 Message-Id: <20210520212549.15466-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfOwP3nA6oJVkwTCOj/FrR2u1vBA6XHKIGMwib2RpTePedoEWyxNlnfkLlbUZLOXdTKKp8KxFsT8g0zq6cOCqzB4IMXeRlj20rhYviJzWNJw+1b8HB+9u Rtf+dxiiwDSPNvpSvbHOptScCcxZa7QmqEwy58NBaql3jhxYNlkbTQAh Subject: [FFmpeg-devel] [PATCH 1/3] avformat/moflex: Initialize format 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 77olbfMdtu9Y Fixes: CID1477423 Uninitialized scalar variable Signed-off-by: Michael Niedermayer --- libavformat/moflex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/moflex.c b/libavformat/moflex.c index 0adb5f4864..dd4e7e0726 100644 --- a/libavformat/moflex.c +++ b/libavformat/moflex.c @@ -172,7 +172,7 @@ static int moflex_read_sync(AVFormatContext *s) unsigned type, ssize, codec_id = 0; unsigned codec_type, width = 0, height = 0, sample_rate = 0, channels = 0; int stream_index = -1; - int format; + int format = AV_PIX_FMT_NONE; AVRational fps; read_var_byte(s, &type); From patchwork Thu May 20 21:25:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 27848 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp2810463iof; Thu, 20 May 2021 14:32:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy96tmgX4VbIfRXTTZYXKoiN+Day8dyP+muzw7sspeo0Pto1hoYzWhldhZetiV6mbSWnqDA X-Received: by 2002:a05:6402:3488:: with SMTP id v8mr6986252edc.51.1621546364667; Thu, 20 May 2021 14:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621546364; cv=none; d=google.com; s=arc-20160816; b=aieLjMd7KLgsd8IEvalxwSKYHR3Qqz/dnvlUKJtuaAFnQpK4cJ3bZK+d7OIpiy8ODK gFPBJZS0BDQs0ZnXNe9AMtG6mjADnwrgKLwL+ROtnUhI3zmJVCeLi2vXfcLmV2kE9apN dJ603tlpQ1OfFyywNOd/za8pZZFjrxlqQkHDJSFxY0ISJHPzaVPsaKJJI1565NdtwskZ JdDjSjf0R2nfqOUTSHWuS6k0fXwny6BMIYWwz68zi8D8XB4xVy4DQ7Ur9LUo8DEfnzfv iJuTTrxNqe46GTgVBThJt05k15JORQQ9Ttw/YHU+JrIzgNhnGPurmiH5g3oSA9kcVgLH HL/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=JWfoUGaDGwGhFZOsG1Mol20H596tgb0QubwRpDK1VBo=; b=yufwCKakg18HH1OO5lwEQHXCGBVxXspH7S4yvCTChW83Xh+6CwOtxPpQ/wHAGK76UJ Z6FWmlA686BoUaLuWbxMK1l19Kxr+8ftBoheOe20/y5Wk1IEHP85Rk7ss9TZKF5QX3v3 BOQ5WjXqOTjBpR9egM/0Dw6yB/jVcdeiJOT6htULG5ZO4hkAx0+7t9xf146JbhR1dNnm moE3v4/B3EuWK2UTyyHRSm/LaKkKgNtValQuYRD+86sxG94d3GjpoiXhL91X2Ndwa4tx eSyVb3U7ctqHNzX51NALaL8veZKp5tc9yATCeleerLMjN6o6wsxI71m3J+FV+/dyQ1Ww 8kcQ== 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 nd5si1174562ejc.395.2021.05.20.14.32.44; Thu, 20 May 2021 14:32:44 -0700 (PDT) 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 BE885689900; Fri, 21 May 2021 00:32:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe05-1.mx.upcmail.net (vie01a-dmta-pe05-1.mx.upcmail.net [84.116.36.11]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D0AD56891CF for ; Fri, 21 May 2021 00:32:32 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe05.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1ljqBu-00EBB3-0G for ffmpeg-devel@ffmpeg.org; Thu, 20 May 2021 23:26:50 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id jqAwlAblfljeHjqAwlB0rN; Thu, 20 May 2021 23:25:50 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=BoHjPrf5 c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=BDMuF1j9A3W1Wg_cwMcA:9 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 20 May 2021 23:25:48 +0200 Message-Id: <20210520212549.15466-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210520212549.15466-1-michael@niedermayer.cc> References: <20210520212549.15466-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfOwP3nA6oJVkwTCOj/FrR2u1vBA6XHKIGMwib2RpTePedoEWyxNlnfkLlbUZLOXdTKKp8KxFsT8g0zq6cOCqzB4IMXeRlj20rhYviJzWNJw+1b8HB+9u Rtf+dxiiwDSPNvpSvbHOptScCcxZa7QmqEwy58NBaql3jhxYNlkbTQAh Subject: [FFmpeg-devel] [PATCH 2/3] Remove format (Alternative solution for CID1477423) 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ISg96szVsLq3 Signed-off-by: Michael Niedermayer --- libavformat/moflex.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavformat/moflex.c b/libavformat/moflex.c index dd4e7e0726..234b0fb06e 100644 --- a/libavformat/moflex.c +++ b/libavformat/moflex.c @@ -172,7 +172,6 @@ static int moflex_read_sync(AVFormatContext *s) unsigned type, ssize, codec_id = 0; unsigned codec_type, width = 0, height = 0, sample_rate = 0, channels = 0; int stream_index = -1; - int format = AV_PIX_FMT_NONE; AVRational fps; read_var_byte(s, &type); @@ -213,7 +212,6 @@ static int moflex_read_sync(AVFormatContext *s) fps.den = avio_rb16(pb); width = avio_rb16(pb); height = avio_rb16(pb); - format = AV_PIX_FMT_YUV420P; avio_skip(pb, type == 3 ? 3 : 2); break; case 4: @@ -235,7 +233,6 @@ static int moflex_read_sync(AVFormatContext *s) st->codecpar->height = height; st->codecpar->sample_rate= sample_rate; st->codecpar->channels = channels; - st->codecpar->format = format; st->priv_data = av_packet_alloc(); if (!st->priv_data) return AVERROR(ENOMEM); From patchwork Thu May 20 21:25:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 27847 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp2810360iof; Thu, 20 May 2021 14:32:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcATcWPweFR86aBWro5Afe/Xd/X7KGv8B48OQaBWIxmCTO7txvJkCd8+b2E5uVbt6aNwUw X-Received: by 2002:a17:906:318b:: with SMTP id 11mr6439790ejy.395.1621546355462; Thu, 20 May 2021 14:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621546355; cv=none; d=google.com; s=arc-20160816; b=HJQvne75MjHgnxohsFZGpeBAY3C8ePqvtmWZasokw4N9NNkOFFTJIHruPBKiuysKQY /aI8Oo8TPu+FXiuU5GDcUBAZbZ1OvwwhR4eoehmL8EWMOPIpxbJoO9KAzUxXGlfRGPBI IJkDHK7EOU2tCKQg8kNrDio8dTupnxK0YC7r38UE8dIiyxRbecUhX2gmAKBPREXIv0O3 QsWGgjfz6THX6fAveLu+0fW9Ks5TQfQOYpywBFCHLi4FPwmXqFclUgOdi09HePOd03LS 6pR7a5aVN24gII/mGgtNhvST7gx4qwC2B0YsnJLuUSSh0GqMeyXrQo8oQt6+b3FMUqWc zhcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=07064Hcg6t+RzPfYa4P8OxdsaCFv82LGOMe9+qoZvRo=; b=GlL91UdvvYyDOvo3Ht+CJvy2za9Fcg2tIpEh0wQzy4fA3Bju1ih+A1qtOQSLPcTdlO WxwSQmHGIZIG/n4CfRsGFfXvLpqmkkAWHiHm/1LqEza1dM5MuD1mMtuM44xn6l/G7u70 UhqdoOzz75SY0Aiw0FzMKivDhwP05Nfv8qBnHRMiakVXKUHcl9EbzxdagE8NN+Xqvpw/ 2AHm8gUDfJm7loh0+5zCIyKtZCfqEP/S37+4rDJocrKPZm/tsb7RygkmcAQGl+j1VncM y/We9ZBRcwkZX8Fq26eC6HjkeerU2BopKPs35HD82oIAABSdwh9XFQfaYRPrkX0VjsPL ITEw== 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 s20si3720483eja.135.2021.05.20.14.32.35; Thu, 20 May 2021 14:32:35 -0700 (PDT) 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 BC556680BE0; Fri, 21 May 2021 00:32:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe06-1.mx.upcmail.net (vie01a-dmta-pe06-1.mx.upcmail.net [84.116.36.14]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D8632680BE0 for ; Fri, 21 May 2021 00:32:23 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1ljqBu-009QWj-0H for ffmpeg-devel@ffmpeg.org; Thu, 20 May 2021 23:26:50 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id jqAwlAblxljeHjqAwlB0rT; Thu, 20 May 2021 23:25:50 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=BoHjPrf5 c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=I7hKg_iGLXIzsgj-r98A:9 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 20 May 2021 23:25:49 +0200 Message-Id: <20210520212549.15466-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210520212549.15466-1-michael@niedermayer.cc> References: <20210520212549.15466-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfOwP3nA6oJVkwTCOj/FrR2u1vBA6XHKIGMwib2RpTePedoEWyxNlnfkLlbUZLOXdTKKp8KxFsT8g0zq6cOCqzB4IMXeRlj20rhYviJzWNJw+1b8HB+9u Rtf+dxiiwDSPNvpSvbHOptScCcxZa7QmqEwy58NBaql3jhxYNlkbTQAh Subject: [FFmpeg-devel] [PATCH 3/3] avformat/avio: Check av_opt_copy() for failure 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ZbtiWwVvvXAk Fixes: CID1477416 Unchecked return value Signed-off-by: Michael Niedermayer --- libavformat/avio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index 2974f4b2b4..6be6f9bf97 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -313,8 +313,11 @@ int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags, int ret = ffurl_alloc(puc, filename, flags, int_cb); if (ret < 0) return ret; - if (parent) - av_opt_copy(*puc, parent); + if (parent) { + ret = av_opt_copy(*puc, parent); + if (ret < 0) + goto fail; + } if (options && (ret = av_opt_set_dict(*puc, options)) < 0) goto fail;