From patchwork Sun Oct 6 05:01:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 15521 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 58B284415E8 for ; Sun, 6 Oct 2019 08:10:36 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4A50C687FDD; Sun, 6 Oct 2019 08:10:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 02C5A687FA3 for ; Sun, 6 Oct 2019 08:10:28 +0300 (EEST) Received: by mail-wm1-f68.google.com with SMTP id p7so9303204wmp.4 for ; Sat, 05 Oct 2019 22:10:28 -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 :mime-version:content-transfer-encoding; bh=8Myt/XkYAkms7tZ+7L2J9B79eeStZcWmz4P60vlzuxo=; b=rkzurHeUfeb4kSdeeAHNVNJSoUvA2FPe7HQpMXoOl3S3IjKuPBytrX+kRpIxvU+ALO WlZzOTE4+vqkz6rU8I3wIyRKM6hNwYiSJhdA0P2+Kqkc3w9qApjuDxWkY4Cy38Z1N+De AUBxFGz7RtimDKgGXMun4xatIW3wZjpSru+HHCyzhxJA4d6UMdK8r1nm7Z+Ju6GC5/zS jrMRnk+gsaiR+AWb+reuFcJzUcTwQDRYqYISDYsrPSdM4P4JCMjdlF0JKo1L/vvLP2ca 6IsPXUqDFJ20cgUgZZbd59DZXfcJAVS/peuZyc/rsGA0C7YxTdkQEfz+/4oNTlMApxIE SUrw== 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:mime-version:content-transfer-encoding; bh=8Myt/XkYAkms7tZ+7L2J9B79eeStZcWmz4P60vlzuxo=; b=W5ViA9wy8nydl67M0opStkww+59qhRkuUDN6w21yRIUxWJxbpJWeHEwxU8glYFc0aF uxbWUuaK7P4gTOB2H541BquUV2ULoGRF0sAYkUqGiLjg36FmUKs15VbBWQatWVILU3Fu WF5rX68aAESbd109NZBxPpuELLFAb1oIa/biKvAk9qSMX8+NAIaH1IcOhvgBQiTTlovT 310FLmoYNUi4FYKFd40JsC3qgAwQGAJ25dVfvQy1FPAwhypaPYXarhx55pqoYibC9gFD TQ4/Z7HNxuD/CgghHYo4cbSMB1Nf6R6Z244Ljn+o8auZ1v5Bm+nQvyDmoBB5o9tx+XHN m0Eg== X-Gm-Message-State: APjAAAW62CbSkoxtV/GS+Cu4txMNVIQl3Mnx6NEDK0RZd6KjgNZ/MuHw 4p4Px8RiztchqzXM/Xh/kwSW7d30cWE= X-Google-Smtp-Source: APXvYqwYrIm/nshg/nmr6V2h+HNdxuPs9CBCCOcQr4rWWHicjfmHgIWEFqaHydl0V0gt49pLZNj15A== X-Received: by 2002:a7b:c757:: with SMTP id w23mr15714469wmk.31.1570338628347; Sat, 05 Oct 2019 22:10:28 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc08937.dynamic.kabel-deutschland.de. [188.192.137.55]) by smtp.gmail.com with ESMTPSA id s10sm18543014wmf.48.2019.10.05.22.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2019 22:10:27 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 6 Oct 2019 07:01:16 +0200 Message-Id: <20191006050120.26807-6-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191006050120.26807-1-andreas.rheinhardt@gmail.com> References: <20191006050120.26807-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/10] avcodec/flac_parser: Fix number of buffered headers 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" Only decrement the number of buffered headers if a header has actually been freed. Signed-off-by: Andreas Rheinhardt --- libavcodec/flac_parser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index 197f234e61..8c61f3a88c 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -562,7 +562,6 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx, for (curr = best_child->next; curr; curr = curr->next) curr->offset -= best_child->offset; - fpc->nb_headers_buffered--; best_child->offset = 0; fpc->headers = best_child; if (fpc->nb_headers_buffered >= FLAC_MIN_HEADERS) {