From patchwork Wed Sep 26 09:49:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 10490 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:1286:0:0:0:0:0 with SMTP id 6-v6csp517934jap; Wed, 26 Sep 2018 02:50:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV616qECcUyWMMNooU7aZVW99/j/aBIFYxUbXtbaaV9AmqIFe8+IzfP/e2f7Xh/CXKmxnfOnM X-Received: by 2002:a1c:cc0e:: with SMTP id h14-v6mr3360497wmb.2.1537955411878; Wed, 26 Sep 2018 02:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537955411; cv=none; d=google.com; s=arc-20160816; b=ppxF8pRFzzSSWuUiQNFsaf1BYYeF+qRMX17u0f5tphLlPP46CGgD4e4kajGpjF6rVL zlpKQIZusHN99YUrO7YMpymb42+NbL8C9WbshVVgpG6rbGg9VnOxBEGB9y+4AcLaNfru FE/WSZlqTATE1sf1XRUvPv56kEy19gA2wwiLWF19P2tZSBhNvPnmze+Cq7ptuo5Fz6QQ p2ZUBYzhRgNBHItZQkmoSusMmYBYOAaHlEb01Y9+wlzISQIDcwW3KCesPjBu6Std+3jm 9m1AsQduruCpiwvTr1UPQK6Z82Ec9wACdL0mdM7dyolWVoG6EXzqzGjTKWoUQ8SWFay8 IEQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=Sw3xOJfxSeff00Bfr8w1uozS8sPSysMHom7P82xcvaQ=; b=kYVhE7pWSgRP+lW6ddW9A/V701f0gt/Xadcagi9NYO8AuOfWcHdgERfWQqm2iEfDub DEH0q+wx3SSz2J+Ja5ucEoBco8uw1pnZKXZkhsVBR3x6nahG27+y1cOCeZcFyfv/KJ/D +UAxw9PfxHJZXxDb1YmY3l3C+GNXsC/12zPObHYVC5Gzx+LD8wHWhZMDdd17v0SrvgUQ Axq5TWbufXqhFmbpeV8CryIN+Gg9FqsGovKXrwPRNMCoZMm9CQz/7fljOOP/vTSrLkAp am7jLzcGE47c/gi4G7HZIBfxUCLscUOHWnekrmUyRiyU1Bf0dpkNVwOekh8Q5qFa41rZ PunQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="LKVjUy/z"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y18-v6si3752120wrq.313.2018.09.26.02.50.11; Wed, 26 Sep 2018 02:50:11 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="LKVjUy/z"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0BCB068A561; Wed, 26 Sep 2018 12:49:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2169C68A12C for ; Wed, 26 Sep 2018 12:49:48 +0300 (EEST) Received: by mail-pf1-f181.google.com with SMTP id k19-v6so13196603pfi.1 for ; Wed, 26 Sep 2018 02:50:04 -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; bh=pCqcTlMK2ynMsdPz1CQpJ2+ISUsZg9TWIqfvmYstH54=; b=LKVjUy/zugG05V+h6tXDBG/Zu1/CD+DTWG7ZmNbte+Fj2mHZ6R9ROfcPnWTIgu2Tle cP0+3rQOBavZtNieovBsAXV3nIPsO7xq8idkEJ+JW7sfNuiPRxDMolnSOx5zKwmZ3KZi xM/8eZKv/VWX6bJcHkit9+wbeP9YZgR4bUwpJEdzTXy6s6pYAb4HAxeNZH3BflQqdT2T o+gi9HDgvY4FP2b+fDe/An776L0iNHeLFaYmr7FXyhb8gFLsviLK0BWEnbOofsdzuy5+ QN2+Fc0wnCAOCSmKsLPu0+eNPL8oCEmQF10gV7UijHNoIpQL+7BWLphC/ucqcncTFWvn KhXw== 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; bh=pCqcTlMK2ynMsdPz1CQpJ2+ISUsZg9TWIqfvmYstH54=; b=BTqXQyXwTbHCyIdVMr6c4SjT6FwPoXhpyfpqkDDrkYX2GX+CN/jA1i4YFbBAstJLKx tt91Rs2nROkSFgFuUYsvmsOZssPiE+wJDUCEbpvdDajfAZAfEMub6YG6rja0OJ0yDLz6 i5UVz5QRzi+RPFGkSQaVgW2HQC+ChFQG3LrTBbSLHGWq5+CwJscQ937/PMG6ve9/Mabu toC93teAhLnjo7bKb5pSFXgt7lPXBGevTrSNwb9vVYCvoK6cgMfxi2kfGdUlca6hTwEI z3oyZQ37ryvASHuv/7Dxze0YPYqZASTjWCAwTco1am5Jv7QsiNjdYCUlI2JJnn4BuC1+ 8SkA== X-Gm-Message-State: ABuFfoi6BpW+kyS4gDNa+fwI6A8eU3nQWirxUR9ZKavGJwdHxCcS62Np LDhpZfdda3zpel4o/eB+EoHY4M7/ X-Received: by 2002:a63:2348:: with SMTP id u8-v6mr5003469pgm.122.1537955402556; Wed, 26 Sep 2018 02:50:02 -0700 (PDT) Received: from localhost.localdomain ([47.90.47.25]) by smtp.gmail.com with ESMTPSA id t1-v6sm6085576pgp.32.2018.09.26.02.50.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 02:50:01 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Wed, 26 Sep 2018 17:49:54 +0800 Message-Id: <1537955394-29009-1-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 1.7.1 Subject: [FFmpeg-devel] [PATCH V1] ffmpeg: fix video_delay warning for HEVC/MPEG4 decoding 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: Jun Zhao , Jun Zhao , Lin Xie MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" For HEVC/MPEG4, we also need video_delay from the decoder, when decoding some HEVC/MPEG4 clips, got numerous log like: "video_delay is larger in decoder than demuxer", similar ticket: #3711 fix ticket: #6109 Signed-off-by: Lin Xie Signed-off-by: Jun Zhao --- fftools/ffmpeg.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 934dc71..7e939d0 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2389,7 +2389,9 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_ // The following line may be required in some cases where there is no parser // or the parser does not has_b_frames correctly if (ist->st->codecpar->video_delay < ist->dec_ctx->has_b_frames) { - if (ist->dec_ctx->codec_id == AV_CODEC_ID_H264) { + if (ist->dec_ctx->codec_id == AV_CODEC_ID_H264 || + ist->dec_ctx->codec_id == AV_CODEC_ID_HEVC || + ist->dec_ctx->codec_id == AV_CODEC_ID_MPEG4) { ist->st->codecpar->video_delay = ist->dec_ctx->has_b_frames; } else av_log(ist->dec_ctx, AV_LOG_WARNING,