From patchwork Wed Sep 21 17:01:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Rothenpieler X-Patchwork-Id: 667 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp1053234vsd; Wed, 21 Sep 2016 10:01:51 -0700 (PDT) X-Received: by 10.28.7.71 with SMTP id 68mr3902346wmh.38.1474477311289; Wed, 21 Sep 2016 10:01:51 -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 x5si24780957wmd.13.2016.09.21.10.01.49; Wed, 21 Sep 2016 10:01:51 -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=@rothenpieler.org; 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 86273689CB6; Wed, 21 Sep 2016 20:01:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from btbn.de (btbn.de [5.9.118.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 64BD0689BE8 for ; Wed, 21 Sep 2016 20:01:25 +0300 (EEST) Received: from localhost.localdomain (ip4d1666ad.dynamic.kabel-deutschland.de [77.22.102.173]) by btbn.de (Postfix) with ESMTPSA id D28FC3261E2; Wed, 21 Sep 2016 19:01:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rothenpieler.org; s=mail; t=1474477300; bh=D5ZtP83KnYCao2BSoL1dGA7cOxKo2qBy/BL2+CkBWMs=; h=From:To:Cc:Subject:Date; b=tlIc5VCo1tUTMjZX8AGHHgMaH3qXYBtVHUOOGYRF3rD5pXK0CeZlVNwPn+CW59sn1 w/YXdNCcM33CqnVxkOtQZ5MtsbljFHRRfeqocJUOOdeLSFanFPEfugd1omdgw9rEIT mIZvejJgp/vMyHrT2zG1pxrUuPy/0tk09OKjMqko= From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Wed, 21 Sep 2016 19:01:34 +0200 Message-Id: <20160921170134.5352-1-timo@rothenpieler.org> X-Mailer: git-send-email 2.10.0 Subject: [FFmpeg-devel] [PATCH] avformat/utils: force native h264 decoder for probing 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: Timo Rothenpieler MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavformat/utils.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index a9bd034..4c5340b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -164,6 +164,13 @@ int ff_copy_whiteblacklists(AVFormatContext *dst, const AVFormatContext *src) static const AVCodec *find_decoder(AVFormatContext *s, const AVStream *st, enum AVCodecID codec_id) { +#if CONFIG_H264_DECODER + /* Other parts of the code assume this decoder to be used for h264, + * so force it if possible. */ + if (codec_id == AV_CODEC_ID_H264) + return avcodec_find_decoder_by_name("h264"); +#endif + #if FF_API_LAVF_AVCTX FF_DISABLE_DEPRECATION_WARNINGS if (st->codec->codec)