From patchwork Fri Jun 26 00:47:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 20616 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 59C4F44BC8F for ; Fri, 26 Jun 2020 03:47:49 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 418C268834D; Fri, 26 Jun 2020 03:47:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 560156806A5 for ; Fri, 26 Jun 2020 03:47:40 +0300 (EEST) Received: by mail-pj1-f65.google.com with SMTP id ev7so3449048pjb.2 for ; Thu, 25 Jun 2020 17:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OxMWlabSkA1gveAOSSOIzUlRcy6bfzoXaFGYQhv+BRw=; b=K0x1rsp42FLMS7RfUgsUJiqE5Gy5hRC8QBCqfwLZrbHjuyfbqJ8Wkn40G3M5jqfUdx HOnZ/XOr4myJj4c4o/UhSo8VWXfL0V5MlF6VGAc0k1iGx3VdaMN/pI8f9Y+N2YuqPYz9 asKxeOuY3Lx7HkUDetJNrluM/anMzmiFWVNxtOBIV/7b1aWZwQHYXIWcpJIp0+kKJJJ9 gOyUZA8JHr/Nn7xd6KLfUB2+TOLubbFQ4mp36Y3cJv9xzQb1+ZEce1Wnaupu3vfIAa0n tKr821n2gFWTmyD0gNsmqfsSQffJ2xR13b8YhrLnisWwWk6surFrxZTBfGU2HCTrHa52 l2oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OxMWlabSkA1gveAOSSOIzUlRcy6bfzoXaFGYQhv+BRw=; b=r9Rid3H2HtU67Yn7ouNLZqX+9fWXkQQvD8A9eD6n4lxNC5lo+v0JhuotDUEbpXF6Gu LhfBsUQFHfJljFt96Y8Soxw43qjdC4gsL09F5WrctgQpM5lk6RfhTghMuNky3U0WfWcV jqta8ww3K6TyTqTc0ez0MAAvyxIMx2qNCGEgqX6zzPCYk74voJOf6EqfAYRKfcKTVn0X Pa1w+lyGuqY49/TCTVwWott/JH5gU7jtbbGx1m5ou5VbGp3Tqv3V8/Opdx1SY4FWhR3y 67CsciclWJsrJo6vqklXLVVet69zVZuv4d1U/I5hN3/19sLMv8w2IDZ4VadMjJtv37eI a3uw== X-Gm-Message-State: AOAM531XbesPGw232be62SCtCTC/LUey/CRgfqAWYvf5iwTmM/pcETdy N6bZRg1S2fL8M/4e0unzNcCiUYJa X-Google-Smtp-Source: ABdhPJzWVN0V907MSuA+dXC+kPMPIIuVUNg7OwJHD45bzpbM+X4jlzp7rTZXc0a7YgKv1K7kH+n23w== X-Received: by 2002:a17:90a:65c9:: with SMTP id i9mr658619pjs.201.1593132458364; Thu, 25 Jun 2020 17:47:38 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id f20sm3942768pfn.51.2020.06.25.17.47.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jun 2020 17:47:37 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Jun 2020 08:47:24 +0800 Message-Id: <1593132446-21202-4-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1593132446-21202-1-git-send-email-lance.lmwang@gmail.com> References: <1593132446-21202-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 4/6] avutil/bprint: use AV_BPRINT_SIZE_AUTOMATIC instead of 1 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Limin Wang Signed-off-by: Limin Wang --- libavutil/bprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/bprint.c b/libavutil/bprint.c index 2f059c5..148b7bb 100644 --- a/libavutil/bprint.c +++ b/libavutil/bprint.c @@ -71,7 +71,7 @@ void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max) unsigned size_auto = (char *)buf + sizeof(*buf) - buf->reserved_internal_buffer; - if (size_max == 1) + if (size_max == AV_BPRINT_SIZE_AUTOMATIC) size_max = size_auto; buf->str = buf->reserved_internal_buffer; buf->len = 0;