From patchwork Tue Aug 29 18:40:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Converse X-Patchwork-Id: 4878 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.15.201 with SMTP id 70csp3418187jao; Tue, 29 Aug 2017 11:40:59 -0700 (PDT) X-Google-Smtp-Source: ADKCNb4DsokfNERpbTBKPcZ8MdiJ/54T3r488u59MIGDIM6VDWHEYI5unsG1QUZLlFL5kBWWArM6 X-Received: by 10.223.134.104 with SMTP id 37mr759535wrw.6.1504032059349; Tue, 29 Aug 2017 11:40:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504032059; cv=none; d=google.com; s=arc-20160816; b=oIRLAa5i1Mqf97rd6rDnHlUXR5vRfX5O7fnBeETUzjUX4OG3yG6hW35NoUywxBpGkH JnORRFBE6CbCotb51e034cgXzvSwI5ugBwhNsgxKrv3uaaeUM8C0tyt9ot34iJF2reqE 19juEbZwS5TRGT45rHhsjlO4rMOCctD5vpAIpWW+RJatKLdIlEMGLIYsRC5T/M0OZtSw pBeX3ZZCtQq1ffN5ZRWYcHi5wej8KVcY6kIJul8TYIPWE0fzXOffYhLb0pq0m3bN6/mK WO82Yut3vwfmIH8ccgjn9umoLfKTExOvfzGsWzqKC/Ks8eRKxDrb1Y8+JvTMHO/JJJ46 Q54w== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=Wa+M9NIQ8ZttYhephV3csK6v1QySam06Udo2anXJ4jw=; b=lOyxXovgNFfunEeFT2C2PPDnKFQoGsM0S7SJ3lRTWr37KvWC/BTqRnmbrwabKz4Zae HmArZPMHUEQ9zgX6Vqs/EJpSeMaGcsrMIWsfsDNSknB5Mpd4dB2ltQwUenBQJaBcqFjg sNSgFcGSfjS11eGzV9RGQg+6i3U6lY2QQBx2eQzMHtQgoBUIvVfs+3HuoRnEPmvcMVb/ bZ6aDP9c499O3NPBjsLPc6fNqtKLzixz+blzFwhs6Wz2yOfzGPgFozXboJWutS96us0f C4r4aVHWnS7MYPJgwcoxhIEJF/VXSo5SYB1MBmZL84fhhbXi2tlajoOFK8rIlrO5MMQ0 XSNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=HOIZo6yg; 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=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 90si2923917wra.116.2017.08.29.11.40.58; Tue, 29 Aug 2017 11:40:59 -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=HOIZo6yg; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A684B68A1D7; Tue, 29 Aug 2017 21:40:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 19FD768A138 for ; Tue, 29 Aug 2017 21:40:40 +0300 (EEST) Received: by mail-pf0-f195.google.com with SMTP id k3so2840004pfc.3 for ; Tue, 29 Aug 2017 11:40:40 -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; bh=mqnTILmln2v3r+Ai+UclE3p1AkkA9zjFkppyRCH5QZc=; b=HOIZo6ygJsB5EFx+sSUB6IumkFJ6wAVslaENfHKsA1evW/AUixS/L5RCYFBrk0IsqI wPi5YR56ay0SjLJKSdeyAcs0I9+ze9eIAnnUxfH6K7fHJRk1TzWeRyANZsdgqQp1zOaP kdQ7AAutmjmqw73y5MDMUj9yKMEBLQ4CBrAT3h+j9rMauSrahTh5BIfTy3gA3vG7Zo/H 863NEgZFSu6Fo+KD3HmcBYkGnUmfhWOQb3c3fliJ0mGqLS2BE+kPpvKL34rxeavWHzzv FE/p2wwzK6jfbO8jw6+ADnMKG3eLR8+Gv23yvtURf96XiSO4do+wBN4JGy6zm3dMC4Hy /sgw== 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; bh=mqnTILmln2v3r+Ai+UclE3p1AkkA9zjFkppyRCH5QZc=; b=JMjlkOXbToEhA6v0GIrmCahsKN/rbbLCmhwA65N3knbLpUpmlLccSHW7W26+zIX9+7 POWRUW/XolyIxwaI0AhbBNEqsd/VabFXkUiYzURmFoRIiXm49vwkxX9u7x9Rlq/SgjPU Frstv8Xf719FAAU16vElbGStMA8jKtUKcNgtJ9wrl8cfBraTFjSYmy1OsGtDoIGbwtGd miJcszho3KlIw2ipn18EjP84/Arv27Y251qmZQ9G2rlhUMUCCIFzdHdR648dwXeckqi6 JHBDl8wNs1FBM8Uff/UeBHSZM1iMfceEbl5DpuJMKQrZ3Xn8JCbQFuO9crrnfcTg8ws4 So8w== X-Gm-Message-State: AHYfb5hQUDaDT3atlx6UkbpvxVDey11D7JSNdqItdgtW7nq4oxwfBr51 2P6+iwD6MJbBRrXYC7Q= X-Received: by 10.99.125.82 with SMTP id m18mr1247099pgn.118.1504032038418; Tue, 29 Aug 2017 11:40:38 -0700 (PDT) Received: from localhost.localdomain ([136.25.129.14]) by smtp.gmail.com with ESMTPSA id x12sm6471983pfi.169.2017.08.29.11.40.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Aug 2017 11:40:37 -0700 (PDT) From: Alex Converse To: ffmpeg-devel@ffmpeg.org Date: Tue, 29 Aug 2017 11:40:07 -0700 Message-Id: <20170829184007.9624-2-alex.converse@gmail.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170829184007.9624-1-alex.converse@gmail.com> References: <20170829184007.9624-1-alex.converse@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/2] avformat: Handle AV_CODEC_CAP_CHANNEL_CONF when first frame fails to decode 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: Alex Converse MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixes probing the stream from ticket 6398. Noticed by James Almer. --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 23865c88c4..68ba8aa85b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2997,7 +2997,7 @@ static int try_decode_frame(AVFormatContext *s, AVStream *st, AVPacket *avpkt, while ((pkt.size > 0 || (!pkt.data && got_picture)) && ret >= 0 && (!has_codec_parameters(st, NULL) || !has_decode_delay_been_guessed(st) || - (!st->codec_info_nb_frames && + (!st->nb_decoded_frames && (avctx->codec->capabilities & AV_CODEC_CAP_CHANNEL_CONF)))) { got_picture = 0; if (avctx->codec_type == AVMEDIA_TYPE_VIDEO ||