From patchwork Sun Sep 20 07:43:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22511 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 78494447DAE for ; Sun, 20 Sep 2020 10:44:33 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5FEFD68B72E; Sun, 20 Sep 2020 10:44:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B496068B5F3 for ; Sun, 20 Sep 2020 10:44:26 +0300 (EEST) Received: by mail-wm1-f65.google.com with SMTP id a9so9496244wmm.2 for ; Sun, 20 Sep 2020 00:44:26 -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=o1IU7WPeCTT1qSxV7DdQR9SbpMe8I0W3RKnKae7RhJk=; b=TLthBYIUi6Sklv5KoPN2eP/68yM338YmqEcgqulor75fIFh6/covvV18n7A8eNCUO1 b8QKApoAi/gMgCXTdI71/LuNzIYiRTRQeIBjRmF3vFJGcI+Q3kLGc/FbnTfbM6C0UURr M2XJIuAcE0gH1eSjdLg8CO6yiJwB+qDYkfUMWixGqZ8IdPnloMri8fCcNDZ8EMdYfsCP TFCF2v1MPIhx5Jn7HXrpIrs+z9nEmIAxUfYS3WXZ3vxRplZmsAfGOXx3oWKgrR8LSA5g fFnEMyRp3uxMI92ptkRdbARXcV07xz6o4JLJtiYqLhi37rJw9BapE2b5+5zNSNYPppX+ 59+A== 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=o1IU7WPeCTT1qSxV7DdQR9SbpMe8I0W3RKnKae7RhJk=; b=NYLyn+rhLljWRiZHDafofscjHw67MEXl6xVb4DITBbNRU3oHt2DnnHqKUw9ugW5Se2 TIRMmIjs6PO0C+Gytvf2ThKBEyukIBF4NIPou3vfmsaEnGJhJfuzmd8diQynWQxbAMKA kbCxS65qFwCJg6I/jj3EwZCQ9Ol8FS+trowChiyU4ZceCo8aK6F4DNX1oeLTy0bKR6cJ 8tF2IFgBM0M9FhOrsdsAX26OH7sOnaNxxzg8dhOo3RKFZcHoV1MfEklTpJxl/8Rm/uhl OIRx7g2xvg0D9Dqun4osrwpFYY/fYbHq7tXPCDGioL14rGNv1u+P0NoZm9d3HpZXkLk5 ek+w== X-Gm-Message-State: AOAM531jR9VePTiGQYyU5LSQlMwSaGOa5Wn6MeDn4ramYLcQFnQLzNjN T/Jev1c7FAlHd87QUpwj0+438WnP+M0= X-Google-Smtp-Source: ABdhPJwbdYkmrLgd8w9fbydkk/Ns5nhtmCrJ0O3HIZ+kNPTqNdgCfTlf4R7d4Fs+tJIG2dCYYGByGQ== X-Received: by 2002:a7b:c141:: with SMTP id z1mr24783412wmi.79.1600587865933; Sun, 20 Sep 2020 00:44:25 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id b188sm26357124wmb.2.2020.09.20.00.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Sep 2020 00:44:25 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 20 Sep 2020 09:43:46 +0200 Message-Id: <20200920074346.1517571-2-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200920074346.1517571-1-andreas.rheinhardt@gmail.com> References: <20200920074346.1517571-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avformat/swfdec: Avoid unnecessary skip 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" Signed-off-by: Andreas Rheinhardt --- libavformat/swfdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index 9a0b27bd8c..e427998744 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -78,10 +78,9 @@ static int swf_probe(const AVProbeData *p) && p->buf[3] <= 20) return AVPROBE_SCORE_MAX / 4 + 1; - if (init_get_bits8(&gb, p->buf + 3, p->buf_size - 3) < 0) + if (init_get_bits8(&gb, p->buf + 8, p->buf_size - 8) < 0) return 0; - skip_bits(&gb, 40); len = get_bits(&gb, 5); if (!len) return 0;