From patchwork Fri Mar 27 12:57:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 18437 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 AFC7E44B885 for ; Fri, 27 Mar 2020 14:58:42 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9AB2168B818; Fri, 27 Mar 2020 14:58:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.red.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6640068B741 for ; Fri, 27 Mar 2020 14:58:31 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail.red.khirnov.net (Postfix) with ESMTP id 2904228585C for ; Fri, 27 Mar 2020 13:58:31 +0100 (CET) Received: from mail.red.khirnov.net ([IPv6:::1]) by localhost (mail.red.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id JNIwtNeVZzJF for ; Fri, 27 Mar 2020 13:58:30 +0100 (CET) Received: from quelana.khirnov.net (unknown [IPv6:2a00:c500:61:23b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) client-signature RSA-PSS (2048 bits)) (Client CN "quelana.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail.red.khirnov.net (Postfix) with ESMTPS id B3FD12858AA for ; Fri, 27 Mar 2020 13:58:30 +0100 (CET) Received: from localhost (quelana.khirnov.net [IPv6:::1]) by quelana.khirnov.net (Postfix) with ESMTP id 69F0621200 for ; Fri, 27 Mar 2020 13:58:30 +0100 (CET) Received: from quelana.khirnov.net ([IPv6:::1]) by localhost (quelana.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 1Hs3H7W1IzVM for ; Fri, 27 Mar 2020 13:58:29 +0100 (CET) Received: from libav.daenerys.khirnov.net (libav.daenerys.khirnov.net [IPv6:2a00:c500:561:201::7]) by quelana.khirnov.net (Postfix) with ESMTP id 576762121F for ; Fri, 27 Mar 2020 13:58:21 +0100 (CET) Received: by libav.daenerys.khirnov.net (Postfix, from userid 1000) id 34C7820E0209; Fri, 27 Mar 2020 13:58:21 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 27 Mar 2020 13:57:47 +0100 Message-Id: <20200327125747.13460-13-anton@khirnov.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200327125747.13460-1-anton@khirnov.net> References: <20200327125747.13460-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 13/14] h264dec: rename flush_dpb() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The name is misleading, this function does a lot more than just flushing the DPB. --- libavcodec/h264dec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 67a9cb5438..7679567548 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -485,8 +485,7 @@ void ff_h264_flush_change(H264Context *h) h->mmco_reset = 1; } -/* forget old pics after a seek */ -static void flush_dpb(AVCodecContext *avctx) +static void h264_decode_flush(AVCodecContext *avctx) { H264Context *h = avctx->priv_data; int i; @@ -1063,7 +1062,7 @@ AVCodec ff_h264_decoder = { }, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING | FF_CODEC_CAP_ALLOCATE_PROGRESS, - .flush = flush_dpb, + .flush = h264_decode_flush, .update_thread_context = ONLY_IF_THREADS_ENABLED(ff_h264_update_thread_context), .profiles = NULL_IF_CONFIG_SMALL(ff_h264_profiles), .priv_class = &h264_class,