From patchwork Mon Jul 27 09:08:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 21282 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 19E1744AB7E for ; Mon, 27 Jul 2020 12:14:45 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EAF6C68B7CA; Mon, 27 Jul 2020 12:14:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f67.google.com (mail-ej1-f67.google.com [209.85.218.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2AC4F68B7B9 for ; Mon, 27 Jul 2020 12:14:39 +0300 (EEST) Received: by mail-ej1-f67.google.com with SMTP id dk23so4421235ejb.11 for ; Mon, 27 Jul 2020 02:14:39 -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:mime-version :content-transfer-encoding; bh=X5GJOhR+54Scg2HPqJuF48XpOcutqf4ZgVoKH35w2t4=; b=LIZbahbxpwRARpOnlA+tynFJq6n64nnodd7gMx5dMyjpCRUffk0u8kESN6+gfgt8QO yi29ZMnUkua6zSnxxv+RB87TLBIYIzrv7ICtzmr4LndKZf5DXRxvpiTziIiGqWMelEJi 5HGaGfVg50z8SM1PX/6Mx5gguVGXogYW/BLPDDHRWQmYBUKR5PAd65TduqqmvvZCTmOg faJo22whlfCQRaLBwpgf0Zagy5zs4psEl7V5yzop3XPURZ4SpcJ6sNUzXTuL9ASJpLN2 aWYi0j6d+JKORxWysgoeBV9akIwFH3hcL1Q5NTT/k7CVI8S7VyAtYLsSdyEQ5SxzBTjc INMA== 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:mime-version :content-transfer-encoding; bh=X5GJOhR+54Scg2HPqJuF48XpOcutqf4ZgVoKH35w2t4=; b=Zu38HPgKY6UZp1VHJxsXsVMvgoGYIUo8NYxxBRYbCYHUaDfQRISv+LlSOsP9A/6Suk 7ToYTO2PT0Ne87tUw2xsTiOt1S+TikW95MHQv8KtqCA1pzvLSY8Ex4mKdnh0ySr0hZqZ DDVrVZQpf8BJ/ZWvNK/9bsZpNniGlkS/7CrIGGaad9eh7yS+9Oivypoqer+kSCl29TFs WEzZQVygrI3VRQHpYCo5trt8fgNtEkwKJMNak/N5IOscOMg3gT908qpNB9FH4TZhDZry pD5K49wzEvTzh7Ce+8NuSCtQXQKPoOjrBzRZ7pCsVn0O+s+nXKW0HW1hUhPu9zzZLvZn 36Cg== X-Gm-Message-State: AOAM532y1jVNYy++l/A0wfDd8Q/9pNBfqgV5uAd8H141ZI9Hkq+8pbYo li4ICCdvPE83NmZAwRzboeWuXdGB X-Google-Smtp-Source: ABdhPJxSEalVoQ7szfiEYGEPus6Y3gvmUk3zDPq4lRdmFRCkr6jXaucRW76wuLOdDGj77rgObLs75g== X-Received: by 2002:a50:d9cb:: with SMTP id x11mr19562720edj.93.1595840898057; Mon, 27 Jul 2020 02:08:18 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc10296.dynamic.kabel-deutschland.de. [188.193.2.150]) by smtp.gmail.com with ESMTPSA id ck6sm7080961edb.18.2020.07.27.02.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 02:08:17 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 27 Jul 2020 11:08:06 +0200 Message-Id: <20200727090810.23794-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 1/5] avcodec/golomb: Don't emit error message in get_ue_golomb 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Said error message is not very informative and lacked a proper logging context; furthermore, many callers already provided more descriptive error messages of their own. So just drop this one. Suggested-by: James Almer Signed-off-by: Andreas Rheinhardt --- No change since last time. Will apply this tomorrow unless there are objections. libavcodec/golomb.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 7fd46a91bd..1f988d74aa 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -87,10 +87,8 @@ static inline int get_ue_golomb(GetBitContext *gb) int log = 2 * av_log2(buf) - 31; LAST_SKIP_BITS(re, gb, 32 - log); CLOSE_READER(re, gb); - if (log < 7) { - av_log(NULL, AV_LOG_ERROR, "Invalid UE golomb code\n"); + if (log < 7) return AVERROR_INVALIDDATA; - } buf >>= log; buf--;