From patchwork Tue Aug 23 07:42:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 242 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp2153617vsd; Tue, 23 Aug 2016 00:43:01 -0700 (PDT) X-Received: by 10.194.21.200 with SMTP id x8mr22754429wje.129.1471938181477; Tue, 23 Aug 2016 00:43:01 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id qf2si1843321wjb.265.2016.08.23.00.43.00; Tue, 23 Aug 2016 00:43:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F25256898BC; Tue, 23 Aug 2016 10:42:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe02-1.mx.upcmail.net (vie01a-dmta-pe02-1.mx.upcmail.net [62.179.121.157]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 41572680D22 for ; Tue, 23 Aug 2016 10:42:35 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1bc6Lz-0006BU-TI for ffmpeg-devel@ffmpeg.org; Tue, 23 Aug 2016 09:42:35 +0200 Received: from [192.168.1.3] ([80.110.106.59]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id aXia1t00e1GuxSg01XibYD; Tue, 23 Aug 2016 09:42:35 +0200 X-SourceIP: 80.110.106.59 From: Carl Eugen Hoyos To: FFmpeg development discussions and patches Date: Tue, 23 Aug 2016 09:42:34 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Message-Id: <201608230942.34593.cehoyos@ag.or.at> Subject: [FFmpeg-devel] [PATCH]lavc/h264dec: Improve "Increasing reorder buffer" message loglevel 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" Hi! Currently "Increasing reorder buffer" - that is important if the buffer is increased mid-stream - is always shown, the patch tries to improve this. Please comment, Carl Eugen From 9d7a230a6d13fa43e0e25b5c31c6c7f2703f217e Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 23 Aug 2016 09:31:09 +0200 Subject: [PATCH] lavc/h264dec: Improve "Increasing reorder buffer" message loglevel. Do not show the message for the first frame by default, show a warning if increasing is necessary in the middle of the stream. --- libavcodec/h264dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 9c37d46..ed0b724 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -528,7 +528,8 @@ static void decode_postinit(H264Context *h, int setup_finished) h->last_pocs[0] = cur->poc; cur->mmco_reset = 1; } else if(h->avctx->has_b_frames < out_of_order && !sps->bitstream_restriction_flag){ - av_log(h->avctx, AV_LOG_INFO, "Increasing reorder buffer to %d\n", out_of_order); + int loglevel = h->avctx->frame_number > 1 ? AV_LOG_WARNING : AV_LOG_VERBOSE; + av_log(h->avctx, loglevel, "Increasing reorder buffer to %d\n", out_of_order); h->avctx->has_b_frames = out_of_order; }