From patchwork Thu Dec 30 07:24:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "zozobreak@163.com" X-Patchwork-Id: 32947 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp12839611iog; Wed, 29 Dec 2021 23:24:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwU5gWOm8GVqZ+FfrYirR+4SyJ92/y0UT7xgMjDAzih1v2eG7I9C7dVz9JQ5JeHb/mBgr6K X-Received: by 2002:a17:907:2da3:: with SMTP id gt35mr24426789ejc.704.1640849086972; Wed, 29 Dec 2021 23:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640849086; cv=none; d=google.com; s=arc-20160816; b=knMQ4CjVFdXceIYes+nYN9SOIPAuzqEdAr2hsPVRJtQWrRUO6+Pah1bkm+Mg5rKaFS tUCyRKDM9YlPoud9VlDZUhnOF0KewS7/cw16x4BqMEnSy5ECAARlMQ+ygGM1cLVz8qzN CjVjDU2VM/YqZ+t4KpCITqK2tppwA2CjfnNZGenErkV1zMxMVIR+L+sjmANatgOXF7/l YB7KaDS0rni91ChvAK3sQurOms+hKNRGQXbheXBWD4xI4TCylW96W4+itCOHLiqVck4j JF14EO6ktZeK4BXlkaMYFDqNaLAP4squigtjs0nCYHaEI7YjTLZzpLgjpAevVkdkf78w AWpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=5uKQxyQCVy5wPOCoIipuxQ54xGXXhr24x2QBiDTKfS4=; b=bNcKF2lW9tA0/Ti5FjUJ33hutwOkEUbhQ/ftHMJ3dKoWQ+qwUIWktN6B/q4OAHu9VF LibXnDorgK1mL755QuasIFj3ws3LQCvdytRuV+zL+tbyOUnkU9hvx+emw9FvkrWc/V4W egvziLwCXugl+RRLqEjYbvWJ7HHH5lkk+LSO6vljeRGPS77+GIAc3+xKM9MgIny4GSxn 5sikruqVPmLjScbZmmr4Gc3CO1ZvKLFAE+YnIJgdc3qFl2pEPg+0aFuP0uNwVIQtBdMu awQntSMn+o2Va0wkkaO/mSIX59EigEVcBfk8ZijR8fGfq/pHN2puJ5tkhGmuhqlSYwgW Lq6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@163.com header.s=s110527 header.b=kSThG9j8; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a22si12401235eda.34.2021.12.29.23.24.46; Wed, 29 Dec 2021 23:24:46 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@163.com header.s=s110527 header.b=kSThG9j8; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AEAB868AA67; Thu, 30 Dec 2021 09:24:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-m971.mail.163.com (mail-m971.mail.163.com [123.126.97.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 141EE68A133 for ; Thu, 30 Dec 2021 09:24:34 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=kiqWL FsV5TY0s7XiZEKULrcSgdbeEoJiTZIVcnEdEfA=; b=kSThG9j8N1OLtG0LLNO3U t+4gH4PP0KWuHZr9LbJKv92Ot4KNj1X6xUm7sqAE9/A3gzM+azDuS6LnIj0rUC1u WDwuKYIR9Hzz20bncvuhbcH8F06L0z6WeFF2XZJPYAWylPp9tbdMfl8eNkgR2D4k K4Fo5E28S9quyfD2Qo7wpE= Received: from wuque-pc2.dev-wh.douyu.tv (unknown [220.249.79.114]) by smtp1 (Coremail) with SMTP id GdxpCgCnOwavXs1hlLfwDQ--.37770S2; Thu, 30 Dec 2021 15:24:32 +0800 (CST) From: zourenyi To: ffmpeg-devel@ffmpeg.org Date: Thu, 30 Dec 2021 15:24:28 +0800 Message-Id: <20211230072428.21067-1-zozobreak@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: GdxpCgCnOwavXs1hlLfwDQ--.37770S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7XFWUAw1DWFy3CF45CryfWFg_yoWDtrb_Ca yxCr13GF4DGay2k3WfWr4YyF97uan8C3W3uas7tws0gFZxGr1UGFykXF98Cr15W3Z7GFW3 KF4Fvr1vkw4xKjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRJ5rxUUUUUU== X-Originating-IP: [220.249.79.114] X-CM-SenderInfo: p2r20upuhdyqqrwthudrp/xtbBlxF5w1SIlrewSwABs7 Subject: [FFmpeg-devel] [PATCH v6] avcodec/h264_slice: add warning log when droping picture at 'h264_select_output_frame' X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: zourenyi Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mCTR7uq0Swj3 since there is only debug log 'no picture ooo' when droping a picture, I spent much time to troubleshooting a wrong sps 'num_reorder_frames' param changed by webrtc's 'ParseAndRewriteSps', FFmpeg keeped silence about this error, so a warning log is much helpfull about this. Signed-off-by: zourenyi --- libavcodec/h264_slice.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index c21004df97..f347d8ee1a 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1533,7 +1533,13 @@ static int h264_select_output_frame(H264Context *h) } } } else { - av_log(h->avctx, AV_LOG_DEBUG, "no picture %s\n", out_of_order ? "ooo" : ""); + if (out_of_order) { + av_log(h->avctx, AV_LOG_WARNING, + "drop picture(%c, %d/%" PRId64 ") because out of order\n", + av_get_picture_type_char(out->f->pict_type), out->poc, out->f->pts); + } else { + av_log(h->avctx, AV_LOG_DEBUG, "no picture\n"); + } } return 0;