From patchwork Sun Aug 12 20:32:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 956703 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=t-online.de Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41pVsC0krqz9s8T for ; Mon, 13 Aug 2018 06:32:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 078FF22648; Sun, 12 Aug 2018 20:32:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V9kAKPccX9oj; Sun, 12 Aug 2018 20:32:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D6AB6220B8; Sun, 12 Aug 2018 20:32:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 2DF0F1C2613 for ; Sun, 12 Aug 2018 20:32:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2B5F3824BE for ; Sun, 12 Aug 2018 20:32:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V_U9_UjmQJSP for ; Sun, 12 Aug 2018 20:32:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout02.t-online.de (mailout02.t-online.de [194.25.134.17]) by fraxinus.osuosl.org (Postfix) with ESMTPS id AD3CF82100 for ; Sun, 12 Aug 2018 20:32:08 +0000 (UTC) Received: from fwd39.aul.t-online.de (fwd39.aul.t-online.de [172.20.27.138]) by mailout02.t-online.de (Postfix) with SMTP id E6D5641ACAF2; Sun, 12 Aug 2018 22:32:06 +0200 (CEST) Received: from fli4l.lan.fli4l (ZqtohuZVghT0WYM04gmSGP55p6XFeBcJ6kPcWnILLcdviNfQlNanjoqhA68FGzwZ+q@[84.161.177.252]) by fwd39.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1fox1y-1v5YDA0; Sun, 12 Aug 2018 22:32:06 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:38600 helo=kuhls.lan.fli4l) by fli4l.lan.fli4l with esmtp (Exim 4.91) (envelope-from ) id 1fox1x-00085e-PM; Sun, 12 Aug 2018 22:32:06 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 12 Aug 2018 22:32:01 +0200 Message-Id: <20180812203205.7251-2-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180812203205.7251-1-bernd.kuhls@t-online.de> References: <20180812203205.7251-1-bernd.kuhls@t-online.de> X-ID: ZqtohuZVghT0WYM04gmSGP55p6XFeBcJ6kPcWnILLcdviNfQlNanjoqhA68FGzwZ+q X-TOI-MSGID: d23cf587-1843-492e-a10d-e7c1b01a6b7c Subject: [Buildroot] [PATCH/next 2/6] package/freeswitch: Fix build with FFmpeg 4.0 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Hiroshi Kawashima , Fabrice Fontaine , Sven Neumann MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Bernd Kuhls --- package/freeswitch/0002-ffmpeg4.patch | 70 +++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 package/freeswitch/0002-ffmpeg4.patch diff --git a/package/freeswitch/0002-ffmpeg4.patch b/package/freeswitch/0002-ffmpeg4.patch new file mode 100644 index 0000000000..6c323e097e --- /dev/null +++ b/package/freeswitch/0002-ffmpeg4.patch @@ -0,0 +1,70 @@ +Fix build with ffmpeg4 + +avcodec.c:194:40: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE' +static uint8_t ff_input_buffer_padding[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 }; + ^ +avformat.c:471:14: error: use of undeclared identifier 'CODEC_FLAG_LOOP_FILTER' + c->flags|=CODEC_FLAG_LOOP_FILTER; // flags=+loop + ^ +avformat.c:477:47: error: use of undeclared identifier 'ME_HEX' + av_opt_set_int(c->priv_data, "motion_est", ME_HEX, 0); + ^ +avformat.c:553:15: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER' + c->flags |= CODEC_FLAG_GLOBAL_HEADER; + ^ +avformat.c:638:31: error: use of undeclared identifier 'CODEC_CAP_VARIABLE_FRAME_SIZE' + if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) { + ^ + +Downloaded from +https://svnweb.freebsd.org/ports/head/net/freeswitch/files/patch-ffmpeg4?view=markup + +Signed-off-by: Bernd Kuhls + +--- a/src/mod/applications/mod_av/avcodec.c.orig 2017-07-13 12:07:30 UTC ++++ b/src/mod/applications/mod_av/avcodec.c +@@ -191,7 +191,7 @@ typedef struct h264_codec_context_s { + int hw_encoder; + } h264_codec_context_t; + +-static uint8_t ff_input_buffer_padding[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 }; ++static uint8_t ff_input_buffer_padding[AV_INPUT_BUFFER_PADDING_SIZE] = { 0 }; + + static switch_status_t buffer_h264_nalu(h264_codec_context_t *context, switch_frame_t *frame) + { +--- a/src/mod/applications/mod_av/avformat.c.orig 2017-07-13 12:07:30 UTC ++++ b/src/mod/applications/mod_av/avformat.c +@@ -468,13 +468,13 @@ GCC_DIAG_ON(deprecated-declarations) + c->ticks_per_frame = 2; + + +- c->flags|=CODEC_FLAG_LOOP_FILTER; // flags=+loop ++ c->flags|=AV_CODEC_FLAG_LOOP_FILTER; // flags=+loop + c->me_cmp|= 1; // cmp=+chroma, where CHROMA = 1 + c->me_range = 16; // me_range=16 + c->max_b_frames = 3; // bf=3 + + av_opt_set_int(c->priv_data, "b_strategy", 1, 0); +- av_opt_set_int(c->priv_data, "motion_est", ME_HEX, 0); ++ av_opt_set(c->priv_data, "motion_est", "hex", 0); + av_opt_set_int(c->priv_data, "coder", 1, 0); + + switch (mm->vprofile) { +@@ -550,7 +550,7 @@ GCC_DIAG_ON(deprecated-declarations) + + /* Some formats want stream headers to be separate. */ + if (fc->oformat->flags & AVFMT_GLOBALHEADER) { +- c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + } + + return SWITCH_STATUS_SUCCESS; +@@ -635,7 +635,7 @@ GCC_DIAG_ON(deprecated-declarations) + mst->frame->format = AV_SAMPLE_FMT_S16; + mst->frame->channel_layout = c->channel_layout; + +- if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) { ++ if (c->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) { + mst->frame->nb_samples = 10000; + } else { + mst->frame->nb_samples = c->frame_size;