From patchwork Mon Oct 12 08:12:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22863 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 5CCBB44B947 for ; Mon, 12 Oct 2020 11:12:50 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4923C68BB74; Mon, 12 Oct 2020 11:12:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 72C1C68BB6C for ; Mon, 12 Oct 2020 11:12:44 +0300 (EEST) Received: by mail-wr1-f67.google.com with SMTP id e18so18043333wrw.9 for ; Mon, 12 Oct 2020 01:12:44 -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:reply-to :mime-version:content-transfer-encoding; bh=xxAuykg/Cpv2wUUxcy32wrVwvm8OjV1uMxXFZrKWULU=; b=eFrT/30ok5If6+QLLXM+H1oMG0jylF9PrtA2S9HBcJWIGtzaNKpnBBR9sNRqzo106G zQvvaHBW3vUU56cvlv9nQtkSIpPfoNPNgEA2LRdaiZGiWaT5uq+MJBepVUyXiDoLai/k O1G95zNndK5ArMV2PoABwM0+z5/rIoM2afMRP121PgmcrwSbXyJ7vRxMsR6z9wu8sk6f v4Hhpy//rBzr9qmybAIWQkL5udB62glnepIxZAzIQqqOwSocQt2h0MnI3/1IVN6aYS/o ZsIoLnyRV47yLmpQ6LDByKrdcevN3G76vv73ZaRZK++fajBKpx7MYAJ9DUp/DAlb7q3w wWWQ== 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:reply-to:mime-version:content-transfer-encoding; bh=xxAuykg/Cpv2wUUxcy32wrVwvm8OjV1uMxXFZrKWULU=; b=CT+phMioHP7YnHU+KbqsmLotNVbyXWHoTDWlKs+dN1w0Djw314IPTkIDjI0ryZ7POr uzAdKqk7uy5dULqAZTDbaFVaBmDBkWGKlvyBIFI7sUgizsrXAVgi6hjL/VXZteGT3gJA NsHM1bNEMklDlwn/iFuLpjMr7SXx5QR1NL9mR4GwDY6Gv3wIW06uklAKNKaNrICiHNFT JwWuVKi6/0TFHcthzGERxbMQ7KLm4IwiRASkGqB1VIoZCOqxZwocv3ak+s8TKQbpFT8U Lp66hBYpiEZlH37HNCasRuIWudpu7ho7vsM6tYDpX/xfuuplUf73pkDo0+JLfGxnbFCf n03w== X-Gm-Message-State: AOAM531WYiS7w340PwktPetPZMAnU87SQtv84Jgi7ilYI100hmZdVnIL D7xCRoGUykWddLHqvlKAWekCjlvVQD4= X-Google-Smtp-Source: ABdhPJzFKoT/YmgCjkjt5/B3j0xSG4lcg/49yrXbwMQPGPY6tEZvSg+GNcaTHYF5tjoFxEevI9qfQA== X-Received: by 2002:adf:f792:: with SMTP id q18mr1516984wrp.333.1602490363764; Mon, 12 Oct 2020 01:12:43 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id j7sm2247928wmc.7.2020.10.12.01.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 01:12:43 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 12 Oct 2020 10:12:12 +0200 Message-Id: <20201012081217.1643833-2-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201012081217.1643833-1-andreas.rheinhardt@gmail.com> References: <20201012081217.1643833-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/7] avcodec/speedhq: Don't pretend reading DC can fail 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" It can't, because the tables used don't have any loose ends. This also fixes a bug in the only caller of decode_dc_le(): It didn't check the return value. Signed-off-by: Andreas Rheinhardt --- libavcodec/speedhq.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c index b834b79f28..64758164de 100644 --- a/libavcodec/speedhq.c +++ b/libavcodec/speedhq.c @@ -168,10 +168,6 @@ static inline int decode_dc_le(GetBitContext *gb, int component) } else { code = get_vlc2(gb, ff_dc_chroma_vlc_le.table, DC_VLC_BITS, 2); } - if (code < 0) { - av_log(NULL, AV_LOG_ERROR, "invalid dc code at\n"); - return 0xffff; - } if (!code) { diff = 0; } else {