From patchwork Fri Nov 25 20:57:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Cadhalpun X-Patchwork-Id: 1564 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.90.1 with SMTP id o1csp581387vsb; Fri, 25 Nov 2016 12:58:08 -0800 (PST) X-Received: by 10.194.122.101 with SMTP id lr5mr9104312wjb.210.1480107488910; Fri, 25 Nov 2016 12:58:08 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w15si15975387wmw.89.2016.11.25.12.58.08; Fri, 25 Nov 2016 12:58:08 -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=@googlemail.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; dmarc=fail (p=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 78CB7689AD2; Fri, 25 Nov 2016 22:58:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2D10A6809DC for ; Fri, 25 Nov 2016 22:57:55 +0200 (EET) Received: by mail-wm0-f65.google.com with SMTP id g23so9398831wme.1 for ; Fri, 25 Nov 2016 12:57:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=PSZe3IGuk1VPubSISqEBYRedrBYPU2s3tYAW/8TwfaY=; b=gD/dJKVPaQA9TV2Zx9ApEeNEjupuIcmouOrYe7ogNaKLvrYMH58aOgvwhwP3zWcup5 mEplpj+aPxOgRbmROpC+hrSCOCL4/V6RjvQi9T3VAdgC0/7r/A49/79bT8TKQ6GlxiVF GpWjGZhy/A6oq9DPLADbUH14wpwLKNwuqdEiKupBO/Km9rkYWPVKiKV6gft30RTOoB04 NK5MPUw4mAhZAbWAC0rb+lYlVbCJSbklRbIF6s+SSw0ZDFN/S41zGb6xSVbUnYpzLdV7 0HS3qiRfYVZIiwSadsfNzsb+p3O2oRKDWic6mLaov2xgGubkKMlZpDglpU3q5nYXKBWo aKZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=PSZe3IGuk1VPubSISqEBYRedrBYPU2s3tYAW/8TwfaY=; b=Zx5+zwcL45APiEB0PcySkSKH44dAy3e72Q/rp64c+x12w1qSd/ntHou3FSZV79wgNq uHbUIm+KsCTfl+MavuesizCwn3BZj61FW19R/X+YkaAkAXKp1T5ej9VUtNI27W9mGxbC oKMS1l1yGImT/LQLHm49QUFYvdMu01o2kidTiqQG82bt5CInudLXI2WkrTdpvFK1pxqT XG93Lg2DIo4BDPY2I8BImd1Sh59Yryo+hnKIcfVxDodHhLcAygIwuvjNDrAS8jxxCw6y 6JHw5eQThefO3YF5TNzdB2axp3Mgm3aQVLM4y415vabdz9FO5N8Qq/m6u+ikH3Sguwvy 8oDg== X-Gm-Message-State: AKaTC018xpKMm/fWc+GlMmLB1xyWucZ81m9bkFtwTyibzF91iFAY4woFqJdsdXMSFwJYPg== X-Received: by 10.28.149.79 with SMTP id x76mr8985276wmd.27.1480107478963; Fri, 25 Nov 2016 12:57:58 -0800 (PST) Received: from [192.168.2.21] (p5B0728D8.dip0.t-ipconnect.de. [91.7.40.216]) by smtp.googlemail.com with ESMTPSA id u81sm15190765wmu.10.2016.11.25.12.57.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 12:57:58 -0800 (PST) From: Andreas Cadhalpun X-Google-Original-From: Andreas Cadhalpun To: FFmpeg development discussions and patches Message-ID: <2fcab6e0-bd83-a127-dd36-dbcf92b88834@googlemail.com> Date: Fri, 25 Nov 2016 21:57:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavf: always forward codec_whitelist in avformat_find_stream_info 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" Signed-off-by: Andreas Cadhalpun --- libavformat/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 2634317..b1d0a0a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3695,9 +3695,13 @@ FF_ENABLE_DEPRECATION_WARNINGS if (!has_codec_parameters(st, NULL)) { const AVCodec *codec = find_probe_decoder(ic, st, st->codecpar->codec_id); if (codec && !avctx->codec) { - if (avcodec_open2(avctx, codec, (options && stream_index < orig_nb_streams) ? &options[stream_index] : NULL) < 0) + AVDictionary *opts = NULL; + if (ic->codec_whitelist) + av_dict_set(&opts, "codec_whitelist", ic->codec_whitelist, 0); + if (avcodec_open2(avctx, codec, (options && stream_index < orig_nb_streams) ? &options[stream_index] : &opts) < 0) av_log(ic, AV_LOG_WARNING, "Failed to open codec in av_find_stream_info\n"); + av_dict_free(&opts); } }