From patchwork Wed Jul 10 21:08:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 13891 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 49CA1446CE6 for ; Thu, 11 Jul 2019 00:24:55 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1B71768ABA3; Thu, 11 Jul 2019 00:24:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B6B9368AA1D for ; Thu, 11 Jul 2019 00:24:48 +0300 (EEST) Received: by mail-wm1-f66.google.com with SMTP id s3so3681945wms.2 for ; Wed, 10 Jul 2019 14:24:48 -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=fMsdlBEe4QKTKeonSxuV5nMs00m4DRkSo27gNSG+RvI=; b=hDIWzwRRTEcs5yRNjo40u/7mNK72Gkqukh3nZfFGDYUP/nLNxgGJIeScFpzDAONvL5 X6nPpC5phkD7h2pwsc1jQVEP7aCeSNUkMGq7NkDgQYYkDBa93704QuhnwF+LwBPoHcXl 080TNR9Mh162nuzt5HmxtE6Z479ljZAudENyYOYhhuT7SyYuikCDflssDiUxCZpMi9s+ chrxK6kJpLsBrbeMv8Ams+bAuVIj2Y89ah/quS/0qLbWIvMPX/8mucGb3hx3fiOAbOKX IsWV4nKqGU490YWEQjvYqKUqI7HiYGj3K4B3HZjU9Opkene1IQm7WhQzZHf8QTW3JAiz FZLA== 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=fMsdlBEe4QKTKeonSxuV5nMs00m4DRkSo27gNSG+RvI=; b=rno5vE/LzV8OYlrX/kH8xk7YyMrC8E2e++dIuTc6q0LCIghhTt87evQpkH0336QkqB HHBO3gdXKKxtdAQK4y9hfScQ44qysqAgIocJ5q5IzTRt1bLPIF8lrMSB361cYTVGmXon swHpjaL35vp8yVZqjAh5P1ZNL0TyulxCfZKRiUXyEYd629wRIaz5ZJkZbWXgUWNyxrBk lgWZmpupeIxgNP1Ew7TaYrW9dItlIciCnB0Trjv4qfBw2qbwL5dROyuN6+ZfgD3IdaGw RRYyTYcCkrDuxM51YZYhqZteTZjAMr9MCTZjwASYKZxM8ZXcjah7chA0sbBtclqiE6em eBnQ== X-Gm-Message-State: APjAAAXimC199kEASsIhLCUw0z3Qy8DLJzeCJ71eKZEt4Ox6xRr//6mM LbEa8+rjoRUVZb6xKtE309qxfiCs X-Google-Smtp-Source: APXvYqzotYzabakQ7oj+6Rw8lHm37godcYZynQPnqJSr1QV8AZpfO7IRvMHGehaXNhsLsoz1r9hYRA== X-Received: by 2002:a05:600c:2146:: with SMTP id v6mr6570715wml.59.1562793408135; Wed, 10 Jul 2019 14:16:48 -0700 (PDT) Received: from localhost.localdomain (ipbcc08b8f.dynamic.kabel-deutschland.de. [188.192.139.143]) by smtp.gmail.com with ESMTPSA id z19sm2209058wmi.7.2019.07.10.14.16.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 10 Jul 2019 14:16:47 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 10 Jul 2019 23:08:27 +0200 Message-Id: <20190710210827.20409-2-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190710210827.20409-1-andreas.rheinhardt@gmail.com> References: <20190710210827.20409-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] mpeg4_unpack_bframes: Merge close and flush 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" They are identical now. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4_unpack_bframes_bsf.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libavcodec/mpeg4_unpack_bframes_bsf.c b/libavcodec/mpeg4_unpack_bframes_bsf.c index 382070b423..1500d2135d 100644 --- a/libavcodec/mpeg4_unpack_bframes_bsf.c +++ b/libavcodec/mpeg4_unpack_bframes_bsf.c @@ -145,13 +145,7 @@ static int mpeg4_unpack_bframes_init(AVBSFContext *ctx) return 0; } -static void mpeg4_unpack_bframes_flush(AVBSFContext *bsfc) -{ - UnpackBFramesBSFContext *ctx = bsfc->priv_data; - av_buffer_unref(&ctx->b_frame_ref); -} - -static void mpeg4_unpack_bframes_close(AVBSFContext *bsfc) +static void mpeg4_unpack_bframes_close_flush(AVBSFContext *bsfc) { UnpackBFramesBSFContext *ctx = bsfc->priv_data; av_buffer_unref(&ctx->b_frame_ref); @@ -166,7 +160,7 @@ const AVBitStreamFilter ff_mpeg4_unpack_bframes_bsf = { .priv_data_size = sizeof(UnpackBFramesBSFContext), .init = mpeg4_unpack_bframes_init, .filter = mpeg4_unpack_bframes_filter, - .flush = mpeg4_unpack_bframes_flush, - .close = mpeg4_unpack_bframes_close, + .flush = mpeg4_unpack_bframes_close_flush, + .close = mpeg4_unpack_bframes_close_flush, .codec_ids = codec_ids, };