From patchwork Sat Feb 10 10:13:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Faiz X-Patchwork-Id: 7544 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.150.1 with SMTP id c1csp1817142jai; Sat, 10 Feb 2018 02:13:22 -0800 (PST) X-Google-Smtp-Source: AH8x226DeSJ4lOb4enXROT4TgF+PyO2K+JDNy6QhtsfRuB32Ee0BQ4SyENTSsZBdknULVRgQ80Zk X-Received: by 10.28.111.132 with SMTP id c4mr4476885wmi.54.1518257602043; Sat, 10 Feb 2018 02:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518257602; cv=none; d=google.com; s=arc-20160816; b=EOKqfSBQVEjV1fGCnNPFL9mpIDJ8eFSTHIr22e8KUsQLiLjH2ANAHxX7wvG3tNtrg9 J2VyGiuq63qPDekfNPx0br9Bz7BP28uUW1oLDHk7uwd9eqRjEk9r8rysSrJwrTH2x3Wl 5OX73u2blXSrKDtM5KGiicM9kccWORDPY7kj78QUGJGJfVxNpGvU8RpbGLmfMTpLH0cE I7SwkCI7LsdRlUeLTNPyBJsCtxVQe1aD4mQAGUf7QPKPWpevTc3485W1sMpjhMujXpmW PZHBJYw6/TCWghVbYiPcGrxX+JoY3dhl7/TvT9AbEp2NY/dE7e2TwJI/neuOFgELfh20 VpDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:delivered-to:arc-authentication-results; bh=Zo4OSi9d8lxwfT8uowdwZ+unYZg1Tvf3qbJ22UBy8Ck=; b=hAI+haKSkTrEkD3yO4XMAWhDd4Jmi25OzIc0yA8gCIdhTg0r6BIyi+zTNUOw83oeN7 /4ZjEbiHgZpUX3DCPcc6asKh/KbW6rtnWYkLeh7jBwldZdngMb49A4ng8k2F/Jp42Spy EyL6SNC377yQDFzCkkAiDKToUC9Wxh+6Ae1ktaGev+tiskxOT9BZuzYukbQySr9uXEoN N1SuZbfst31IZwov88COUU63qUPZt0Fh+ShphNRhOWTO9aqD0q69mjn2zvm4Ta8+nwwR Ccpu3ziaiZI0VpyZ6VPXfDa8sxIfFt29icGN0ezk+ZYDV0APCfrx1OEtwJ040JQYCLcG rtBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=IM/+mBw3; 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 i2si780848wmc.119.2018.02.10.02.13.20; Sat, 10 Feb 2018 02:13:21 -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=@gmail.com header.s=20161025 header.b=IM/+mBw3; 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 CD137689977; Sat, 10 Feb 2018 12:13:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com [209.85.220.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 68A826898E2 for ; Sat, 10 Feb 2018 12:13:03 +0200 (EET) Received: by mail-qk0-f176.google.com with SMTP id d72so13078727qkc.6 for ; Sat, 10 Feb 2018 02:13:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=4rr4/+dcVK7rZ/7hBnWQW5MkbrU56GwtYXLtTOK8ti8=; b=IM/+mBw3GEpTaJOHK3veWWNj2HfzyzQ/4zTUaMghlUVOoMf/hsNiYmKkRgGMIteE6B zx9gYNJ9t7qyhnuQwLfYVmd5QESbAPJR/j+aztC0pxAiwBPGkw/smpqPrBH1e4QA4zGx jiU8I8dQBcdbDaorWufBeP/Ys5rjgOUZkaG/rKJqaPdlclajrUwdM5IBaNfNw7TZdCOY RgICjJbdDgIG2wwABB/65Leu7te8gZHXJqisYsj2y/J5Mh7uFFj+8BNM0Ow2tOWKoQ5b uMbwQG7DcSWXWrBS+mdxBMYb3maEp6KGXO9kDJNahkWqh9h5qu6uWIxw+Jd9Hl6db5dU RKHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=4rr4/+dcVK7rZ/7hBnWQW5MkbrU56GwtYXLtTOK8ti8=; b=e8cdkEPnz3Gv5qRTFXz116d0tQhNjXtNLG7gQ8YzBKQXyLctIhASshzhw2dZyZfEtz LTzeiNaE7QPbka+o8jl5QyM1F+QcYxA8jtCOjCYdQJI9h0cEdgMuaiCW2IH95fNaytE+ iU9kuNL3UI3VfTyhV5YPjUALsW6NjCjD0qV4XnughFJSgRtX2t/sLaBYWQ0UN9uGHBUs ykUYI72kz3+TKIJqppNVfnQeYIVgKZqB0mykSmS+gOxwUPIPPmcX7yqbaPaRqjUy/pie lPojVruMGVOpAJkzTpY+8gti2/6aMFvMuTlc+Igr9SMsW384Bo6B4L4IYWE6Od+3D0yJ aAzg== X-Gm-Message-State: APf1xPACkSKkMoJdkNi6YwNU6563Es6kpRkqgRF2oig4DKZqXAKxKb0Q mIIrPE3wuSL6HiqIl/SSjpx+aQ28OnM8rMChgPs= X-Received: by 10.55.26.35 with SMTP id a35mr1810539qka.308.1518257591487; Sat, 10 Feb 2018 02:13:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.38.99 with HTTP; Sat, 10 Feb 2018 02:13:10 -0800 (PST) In-Reply-To: <20180210005100.GB4235@michaelspb> References: <20180206185743.C796C172F2E@albiero.videolan.org> <20180207125233.GA543110@phare.normalesup.org> <20180208000421.GF3063@michaelspb> <548582de-25ba-9b79-3edf-5408fc7102f9@gmail.com> <20180210005100.GB4235@michaelspb> From: Muhammad Faiz Date: Sat, 10 Feb 2018 17:13:10 +0700 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] lavc: add new API for iterating codecs and codec parsers 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" On Sat, Feb 10, 2018 at 7:51 AM, Michael Niedermayer wrote: > On Fri, Feb 09, 2018 at 10:21:04PM +0700, Muhammad Faiz wrote: >> On Fri, Feb 9, 2018 at 6:53 PM, James Almer wrote: >> > On 2/9/2018 7:56 AM, Muhammad Faiz wrote: >> >> On Thu, Feb 8, 2018 at 7:04 AM, Michael Niedermayer >> >> wrote: >> >>> On Wed, Feb 07, 2018 at 01:52:33PM +0100, Nicolas George wrote: >> >>>> Josh de Kock (2018-02-06): >> >>>>> ffmpeg | branch: master | Josh de Kock | Fri Dec 22 22:17:00 2017 +0000| [7e8eba2d8755962d9dca5eade57bf8f591a73c0c] | committer: Josh de Kock >> >>>>> >> >>>>> lavc: add new API for iterating codecs and codec parsers >> >>>>> >> >>>>> Based on an unfinished patch by atomnuker. >> >>> >> >>> This commit also breaks >> >>> >> >>> ./configure --enable-libsoxr && make -j12 fate-checkasm >> >>> make -j12 fate-checkasm >> >>> ... >> >>> LD tests/checkasm/checkasm >> >>> libswresample/libswresample.a(soxr_resample.o): In function `get_out_samples': >> >>> ffmpeg/libswresample/soxr_resample.c:118: undefined reference to `soxr_delay' >> >>> libswresample/libswresample.a(soxr_resample.o): In function `get_delay': >> >>> ffmpeg/libswresample/soxr_resample.c:100: undefined reference to `soxr_delay' >> >>> libswresample/libswresample.a(soxr_resample.o): In function `flush': >> >>> ffmpeg/libswresample/soxr_resample.c:70: undefined reference to `soxr_delay' >> >>> ffmpeg/libswresample/soxr_resample.c:72: undefined reference to `soxr_process' >> >>> ffmpeg/libswresample/soxr_resample.c:77: undefined reference to `soxr_process' >> >>> ffmpeg/libswresample/soxr_resample.c:78: undefined reference to `soxr_delay' >> >>> libswresample/libswresample.a(soxr_resample.o): In function `process': >> >>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to `soxr_set_num_channels' >> >>> ffmpeg/libswresample/soxr_resample.c:88: undefined reference to `soxr_set_error' >> >>> ffmpeg/libswresample/soxr_resample.c:90: undefined reference to `soxr_process' >> >>> libswresample/libswresample.a(soxr_resample.o): In function `destroy': >> >>> ffmpeg/libswresample/soxr_resample.c:65: undefined reference to `soxr_delete' >> >>> libswresample/libswresample.a(soxr_resample.o): In function `create': >> >>> ffmpeg/libswresample/soxr_resample.c:46: undefined reference to `soxr_io_spec' >> >>> ffmpeg/libswresample/soxr_resample.c:48: undefined reference to `soxr_quality_spec' >> >>> ffmpeg/libswresample/soxr_resample.c:56: undefined reference to `soxr_delete' >> >>> ffmpeg/libswresample/soxr_resample.c:57: undefined reference to `soxr_create' >> >>> collect2: error: ld returned 1 exit status >> >>> make: *** [tests/checkasm/checkasm] Error 1 >> >> >> >> Fixed in 81d6501be77b273053a66eeced94d78e2021f1d1 >> >> >> >> Thank's. >> > >> > This is not a proper solution. swr is pulled by avcodec only if Opus >> > decoder is enabled. There's no reason to hardcode it for checkasm otherwise. >> > The problem here is that the Makefile should pull all the dependencies >> > of its hardcoded dependencies. This is what FFLIBS and FFEXTRALIBS do in >> > common.mak to link the actual libraries. >> >> Probably, this is not a proper solution, but it is trivial enough. >> (I'm sorry that I pushed it without posting). >> So, please fix it with the proper solution. Probably, by adding >> swresample-extralibs to avcodec-extralibs when avcodec has dependency >> to swresample. I don't know how to do it. >> > >> > >> > That said, was this really a regression generated by this commit? It >> > looks unrelated. >> >> Actually, it was a bug even before this commit. Just, previously it >> was hidden because linker was smart enough to discard unneeded >> dependency. But now when the list is changed to array, the linker is >> unable to do it. > > iam not sure i understand correctly. But does this mean that > tools/target_dec_"codec"_fuzzer will now include everything and not just > the "codec" ? > If so this will possibly prevent FFmpeg from being tested in googles ossfuzz > framework. As their diskspace was already rather tight. > > i do see on my disk that the more recently build fuzzers have gottem MUCH > larger: > -rwxr-x--- 1 michael michael 17588987 Feb 3 18:53 tools/target_dec_scpr_fuzzer* > -rwxr-x--- 1 michael michael 17476326 Feb 4 02:16 tools/target_dec_paf_video_fuzzer* > -rwxr-x--- 1 michael michael 143210465 Feb 9 13:53 tools/target_dec_h264_fuzzer* > -rwxr-x--- 1 michael michael 143210465 Feb 9 13:56 tools/target_dec_vp3_fuzzer* > Does the attached patch fix the problem? Thank's. From 46d5a15dba7578d312aae59048ad608c9afdacbf Mon Sep 17 00:00:00 2001 From: Muhammad Faiz Date: Sat, 10 Feb 2018 17:08:04 +0700 Subject: [PATCH] tools/target_dec_fuzzer: don't use avcodec_register() Signed-off-by: Muhammad Faiz --- tools/target_dec_fuzzer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 62d62a9de3..6c575f8845 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -144,7 +144,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { #define DECODER_SYMBOL0(CODEC) ff_##CODEC##_decoder #define DECODER_SYMBOL(CODEC) DECODER_SYMBOL0(CODEC) extern AVCodec DECODER_SYMBOL(FFMPEG_DECODER); - avcodec_register(&DECODER_SYMBOL(FFMPEG_DECODER)); + if (DECODER_SYMBOL(FFMPEG_DECODER).init_static_data) + DECODER_SYMBOL(FFMPEG_DECODER).init_static_data(&DECODER_SYMBOL(FFMPEG_DECODER)); c = &DECODER_SYMBOL(FFMPEG_DECODER); #else -- 2.13.2