From patchwork Sun Aug 12 20:32:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 956705 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 41pVsR3CzWz9s9l for ; Mon, 13 Aug 2018 06:32:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9FA7A226B5; Sun, 12 Aug 2018 20:32:24 +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 7ERYV1yoJewM; Sun, 12 Aug 2018 20:32:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 43CD6226B0; Sun, 12 Aug 2018 20:32:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7C6B11CF2AB for ; Sun, 12 Aug 2018 20:32:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7874A857C2 for ; Sun, 12 Aug 2018 20:32:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 65Lvb-1O8SPS for ; Sun, 12 Aug 2018 20:32:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout08.t-online.de (mailout08.t-online.de [194.25.134.20]) by whitealder.osuosl.org (Postfix) with ESMTPS id BEF1181E67 for ; Sun, 12 Aug 2018 20:32:11 +0000 (UTC) Received: from fwd22.aul.t-online.de (fwd22.aul.t-online.de [172.20.26.127]) by mailout08.t-online.de (Postfix) with SMTP id 5EE9641CA046; Sun, 12 Aug 2018 22:32:10 +0200 (CEST) Received: from fli4l.lan.fli4l (S86K-6ZOwhnlo66xsp2tkK60x7ZB65z+JtY4iP-T0Q7q85meLs++rCIX9d+JMi8gCD@[84.161.177.252]) by fwd22.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1fox1y-1cqH0S0; 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-Bp; Sun, 12 Aug 2018 22:32:05 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 12 Aug 2018 22:32:00 +0200 Message-Id: <20180812203205.7251-1-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.18.0 X-ID: S86K-6ZOwhnlo66xsp2tkK60x7ZB65z+JtY4iP-T0Q7q85meLs++rCIX9d+JMi8gCD X-TOI-MSGID: 12b62840-ac61-4748-965d-162f5c7fc590 Subject: [Buildroot] [PATCH/next 1/6] package/aubio: 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/aubio/0001-ffmpeg4.patch | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 package/aubio/0001-ffmpeg4.patch diff --git a/package/aubio/0001-ffmpeg4.patch b/package/aubio/0001-ffmpeg4.patch new file mode 100644 index 0000000000..bdaac55a3d --- /dev/null +++ b/package/aubio/0001-ffmpeg4.patch @@ -0,0 +1,32 @@ +From 5690daf759b473b9d13b4547ef37adc2695cf524 Mon Sep 17 00:00:00 2001 +From: James Cowgill +Date: Sun, 25 Feb 2018 14:23:25 +0000 +Subject: [PATCH] Fix build with FFmpeg 4.0 + +Downloaded from upstream commit +https://git.aubio.org/?p=aubio.git;a=commitdiff;h=5690daf759b473b9d13b4547ef37adc2695cf524 + +Signed-off-by: Bernd Kuhls +--- + src/io/source_avcodec.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c +index ccdce807..8197445c 100644 +--- a/src/io/source_avcodec.c ++++ b/src/io/source_avcodec.c +@@ -58,7 +58,11 @@ + #include "fmat.h" + #include "source_avcodec.h" + ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 56, 0) + #define AUBIO_AVCODEC_MAX_BUFFER_SIZE FF_MIN_BUFFER_SIZE ++#else ++#define AUBIO_AVCODEC_MAX_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE ++#endif + + struct _aubio_source_avcodec_t { + uint_t hop_size; +-- +2.11.0 + 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; From patchwork Sun Aug 12 20:32:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 956704 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 41pVsL1k8yz9s8T for ; Mon, 13 Aug 2018 06:32:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 810B622011; Sun, 12 Aug 2018 20:32:20 +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 LCYbpn7ZIycK; Sun, 12 Aug 2018 20:32:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 85697220B8; Sun, 12 Aug 2018 20:32:16 +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 7B5A11C2613 for ; Sun, 12 Aug 2018 20:32:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 77ADC824BE for ; Sun, 12 Aug 2018 20:32:12 +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 IQPn_1enkiGw for ; Sun, 12 Aug 2018 20:32:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout12.t-online.de (mailout12.t-online.de [194.25.134.22]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 5061482100 for ; Sun, 12 Aug 2018 20:32:10 +0000 (UTC) Received: from fwd08.aul.t-online.de (fwd08.aul.t-online.de [172.20.26.151]) by mailout12.t-online.de (Postfix) with SMTP id 9BA7741ED6D8; Sun, 12 Aug 2018 22:32:08 +0200 (CEST) Received: from fli4l.lan.fli4l (EIZNO-ZDYhGwUcq97YPV3HJUzU9mnXiiTEj6Zln6v1VaZsYUvMUKDCkT-CsJdmtQks@[84.161.177.252]) by fwd08.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1fox1z-3oogPQ0; Sun, 12 Aug 2018 22:32:07 +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 1fox1y-00085e-Aw; Sun, 12 Aug 2018 22:32:07 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 12 Aug 2018 22:32:02 +0200 Message-Id: <20180812203205.7251-3-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> MIME-Version: 1.0 X-ID: EIZNO-ZDYhGwUcq97YPV3HJUzU9mnXiiTEj6Zln6v1VaZsYUvMUKDCkT-CsJdmtQks X-TOI-MSGID: ed18bb8e-9b19-459b-baeb-d655ea582448 Subject: [Buildroot] [PATCH/next 3/6] package/gstreamer1/gst1-libav: 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 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Bernd Kuhls --- .../gstreamer1/gst1-libav/0001-ffmpeg40.patch | 657 ++++++++++++++++++ 1 file changed, 657 insertions(+) create mode 100644 package/gstreamer1/gst1-libav/0001-ffmpeg40.patch diff --git a/package/gstreamer1/gst1-libav/0001-ffmpeg40.patch b/package/gstreamer1/gst1-libav/0001-ffmpeg40.patch new file mode 100644 index 0000000000..864988ef30 --- /dev/null +++ b/package/gstreamer1/gst1-libav/0001-ffmpeg40.patch @@ -0,0 +1,657 @@ +Fix build with ffmpeg 4.0 + +Instead of using the ffmpeg copy included by this package we use a patch +from the Gentoo bug tracker to fix the build with ffmpeg 4.0. + +Upstream included support for ffmpeg 4.0 in the upcoming 2.16.x release +of gstreamer: +https://bugzilla.gnome.org/show_bug.cgi?id=792900 + +NEWS mentions that the fixes "won’t be backported to the 1.14 branch as +it is rather intrusive": +https://github.com/GStreamer/gst-libav/commit/8886a016fce625e1c25a4902be4021196a6784a2#diff-ff4e2dc4962dc25a1512353299992c8dR1400 + +Downloaded from https://bugs.gentoo.org/654628#c11 + +Signed-off-by: Bernd Kuhls + +diff --git a/ext/libav/gstav.c b/ext/libav/gstav.c +index 0b9da42..10d8423 100644 +--- a/ext/libav/gstav.c ++++ b/ext/libav/gstav.c +@@ -30,7 +30,7 @@ + + #include + #include +-#include ++//#include + + #include "gstav.h" + #include "gstavutils.h" +@@ -158,7 +158,7 @@ plugin_init (GstPlugin * plugin) + gst_ffmpeg_init_pix_fmt_info (); + + av_register_all (); +- avfilter_register_all (); ++ //avfilter_register_all (); + + gst_ffmpegaudenc_register (plugin); + gst_ffmpegvidenc_register (plugin); +diff --git a/ext/libav/gstavauddec.c b/ext/libav/gstavauddec.c +index 9aa45e3..fd25efd 100644 +--- a/ext/libav/gstavauddec.c ++++ b/ext/libav/gstavauddec.c +@@ -283,7 +283,7 @@ gst_ffmpegauddec_propose_allocation (GstAudioDecoder * decoder, + gst_allocation_params_init (¶ms); + params.flags = GST_MEMORY_FLAG_ZERO_PADDED; + params.align = 15; +- params.padding = FF_INPUT_BUFFER_PADDING_SIZE; ++ params.padding = AV_INPUT_BUFFER_PADDING_SIZE; + /* we would like to have some padding so that we don't have to + * memcpy. We don't suggest an allocator. */ + gst_query_add_allocation_param (query, NULL, ¶ms); +@@ -665,7 +665,7 @@ gst_ffmpegauddec_drain (GstFFMpegAudDec * ffmpegdec) + + oclass = (GstFFMpegAudDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec)); + +- if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) { ++ if (oclass->in_plugin->capabilities & AV_CODEC_CAP_DELAY) { + gint have_data, len; + + GST_LOG_OBJECT (ffmpegdec, +@@ -744,10 +744,10 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf) + bsize = map.size; + + if (bsize > 0 && (!GST_MEMORY_IS_ZERO_PADDED (map.memory) +- || (map.maxsize - map.size) < FF_INPUT_BUFFER_PADDING_SIZE)) { ++ || (map.maxsize - map.size) < AV_INPUT_BUFFER_PADDING_SIZE)) { + /* add padding */ +- if (ffmpegdec->padded_size < bsize + FF_INPUT_BUFFER_PADDING_SIZE) { +- ffmpegdec->padded_size = bsize + FF_INPUT_BUFFER_PADDING_SIZE; ++ if (ffmpegdec->padded_size < bsize + AV_INPUT_BUFFER_PADDING_SIZE) { ++ ffmpegdec->padded_size = bsize + AV_INPUT_BUFFER_PADDING_SIZE; + ffmpegdec->padded = g_realloc (ffmpegdec->padded, ffmpegdec->padded_size); + GST_LOG_OBJECT (ffmpegdec, "resized padding buffer to %d", + ffmpegdec->padded_size); +@@ -755,7 +755,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf) + GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, ffmpegdec, + "Copy input to add padding"); + memcpy (ffmpegdec->padded, bdata, bsize); +- memset (ffmpegdec->padded + bsize, 0, FF_INPUT_BUFFER_PADDING_SIZE); ++ memset (ffmpegdec->padded + bsize, 0, AV_INPUT_BUFFER_PADDING_SIZE); + + bdata = ffmpegdec->padded; + do_padding = TRUE; +@@ -764,7 +764,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf) + } + + do { +- guint8 tmp_padding[FF_INPUT_BUFFER_PADDING_SIZE]; ++ guint8 tmp_padding[AV_INPUT_BUFFER_PADDING_SIZE]; + + data = bdata; + size = bsize; +@@ -773,15 +773,15 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf) + /* add temporary padding */ + GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, ffmpegdec, + "Add temporary input padding"); +- memcpy (tmp_padding, data + size, FF_INPUT_BUFFER_PADDING_SIZE); +- memset (data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE); ++ memcpy (tmp_padding, data + size, AV_INPUT_BUFFER_PADDING_SIZE); ++ memset (data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE); + } + + /* decode a frame of audio now */ + len = gst_ffmpegauddec_frame (ffmpegdec, data, size, &have_data, &ret); + + if (do_padding) { +- memcpy (data + size, tmp_padding, FF_INPUT_BUFFER_PADDING_SIZE); ++ memcpy (data + size, tmp_padding, AV_INPUT_BUFFER_PADDING_SIZE); + } + + if (ret != GST_FLOW_OK) { +diff --git a/ext/libav/gstavaudenc.c b/ext/libav/gstavaudenc.c +index 6ffbc3e..2a82273 100644 +--- a/ext/libav/gstavaudenc.c ++++ b/ext/libav/gstavaudenc.c +@@ -283,7 +283,6 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info) + } + + /* some other defaults */ +- ffmpegaudenc->context->rc_strategy = 2; + ffmpegaudenc->context->b_frame_strategy = 0; + ffmpegaudenc->context->coder_type = 0; + ffmpegaudenc->context->context_model = 0; +@@ -330,7 +329,7 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info) + oclass->in_plugin) < 0) + GST_DEBUG_OBJECT (ffmpegaudenc, "Failed to set context defaults"); + +- if ((oclass->in_plugin->capabilities & CODEC_CAP_EXPERIMENTAL) && ++ if ((oclass->in_plugin->capabilities & AV_CODEC_CAP_EXPERIMENTAL) && + ffmpegaudenc->compliance != GST_FFMPEG_EXPERIMENTAL) { + GST_ELEMENT_ERROR (ffmpegaudenc, LIBRARY, SETTINGS, + ("Codec is experimental, but settings don't allow encoders to " +@@ -602,7 +601,7 @@ gst_ffmpegaudenc_encode_audio (GstFFMpegAudEnc * ffmpegaudenc, + pkt->size, 0, pkt->size, pkt, gst_ffmpegaudenc_free_avpacket); + + codec = ffmpegaudenc->context->codec; +- if ((codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) || !buffer) { ++ if ((codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) || !buffer) { + /* FIXME: Not really correct, as -1 means "all the samples we got + given so far", which may not be true depending on the codec, + but we have no way to know AFAICT */ +@@ -626,7 +625,7 @@ gst_ffmpegaudenc_drain (GstFFMpegAudEnc * ffmpegaudenc) + + oclass = (GstFFMpegAudEncClass *) (G_OBJECT_GET_CLASS (ffmpegaudenc)); + +- if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) { ++ if (oclass->in_plugin->capabilities & AV_CODEC_CAP_DELAY) { + gint have_data, try = 0; + + GST_LOG_OBJECT (ffmpegaudenc, +diff --git a/ext/libav/gstavcfg.c b/ext/libav/gstavcfg.c +index a1863fd..408e08e 100644 +--- a/ext/libav/gstavcfg.c ++++ b/ext/libav/gstavcfg.c +@@ -42,9 +42,9 @@ gst_ffmpeg_pass_get_type (void) + if (!ffmpeg_pass_type) { + static const GEnumValue ffmpeg_passes[] = { + {0, "Constant Bitrate Encoding", "cbr"}, +- {CODEC_FLAG_QSCALE, "Constant Quantizer", "quant"}, +- {CODEC_FLAG_PASS1, "VBR Encoding - Pass 1", "pass1"}, +- {CODEC_FLAG_PASS2, "VBR Encoding - Pass 2", "pass2"}, ++ {AV_CODEC_FLAG_QSCALE, "Constant Quantizer", "quant"}, ++ {AV_CODEC_FLAG_PASS1, "VBR Encoding - Pass 1", "pass1"}, ++ {AV_CODEC_FLAG_PASS2, "VBR Encoding - Pass 2", "pass2"}, + {0, NULL, NULL}, + }; + +@@ -66,7 +66,7 @@ gst_ffmpeg_lim_pass_get_type (void) + if (!ffmpeg_lim_pass_type) { + static const GEnumValue ffmpeg_lim_passes[] = { + {0, "Constant Bitrate Encoding", "cbr"}, +- {CODEC_FLAG_QSCALE, "Constant Quantizer", "quant"}, ++ {AV_CODEC_FLAG_QSCALE, "Constant Quantizer", "quant"}, + {0, NULL, NULL}, + }; + +@@ -121,9 +121,9 @@ gst_ffmpeg_mb_cmp_get_type (void) + {FF_CMP_VSSE, "VSSE", "vsse"}, + #if 0 + /* economize a bit for now */ +- {FF_CMP_NSSE, "NSSE", "nsse"}, +- {FF_CMP_W53, "W53", "w53"}, +- {FF_CMP_W97, "W97", "w97"}, ++ {AV_CMP_NSSE, "NSSE", "nsse"}, ++ {AV_CMP_W53, "W53", "w53"}, ++ {AV_CMP_W97, "W97", "w97"}, + #endif + {0, NULL, NULL}, + }; +@@ -260,21 +260,22 @@ gst_ffmpeg_flags_get_type (void) + /* FIXME: This needs some serious resyncing with avcodec.h */ + if (!ffmpeg_flags_type) { + static const GFlagsValue ffmpeg_flags[] = { +- {CODEC_FLAG_QSCALE, "Use fixed qscale", "qscale"}, +- {CODEC_FLAG_4MV, "Allow 4 MV per MB", "4mv"}, +- {CODEC_FLAG_QPEL, "Quartel Pel Motion Compensation", "qpel"}, +- {CODEC_FLAG_GMC, "GMC", "gmc"}, +- {CODEC_FLAG_MV0, "Always try a MB with MV (0,0)", "mv0"}, +- {CODEC_FLAG_LOOP_FILTER, "Loop filter", "loop-filter"}, +- {CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"}, +- {CODEC_FLAG_NORMALIZE_AQP, +- "Normalize Adaptive Quantization (masking, etc)", "aqp"}, +- {CODEC_FLAG_GLOBAL_HEADER, ++ {AV_CODEC_FLAG_QSCALE, "Use fixed qscale", "qscale"}, ++ {AV_CODEC_FLAG_4MV, "Allow 4 MV per MB", "4mv"}, ++ {AV_CODEC_FLAG_QPEL, "Quartel Pel Motion Compensation", "qpel"}, ++ //{AV_CODEC_FLAG_GMC, "GMC", "gmc"}, ++ //{AV_CODEC_FLAG_MV0, "Always try a MB with MV (0,0)", "mv0"}, ++ {AV_CODEC_FLAG_LOOP_FILTER, "Loop filter", "loop-filter"}, ++ {AV_CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"}, ++ //{AV_CODEC_FLAG_NORMALIZE_AQP, ++ // "Normalize Adaptive Quantization (masking, etc)", "aqp"}, ++ {AV_CODEC_FLAG_GLOBAL_HEADER, + "Global headers in extradata instead of every keyframe", + "global-headers"}, +- {CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction", ++ {AV_CODEC_FLAG_AC_PRED, ++ "H263 Advanced Intra Coding / MPEG4 AC prediction", + "aic"}, +- {CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"}, ++ {AV_CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"}, + {0, NULL, NULL}, + }; + +@@ -487,31 +488,39 @@ gst_ffmpeg_cfg_init (void) + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.qblur, FALSE, mpeg, NULL); + ++#if 0 + pspec = g_param_spec_float ("rc-qsquish", "Ratecontrol Limiting Method", + "0 means limit by clipping, otherwise use nice continuous function", + 0, 99.0f, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.rc_qsquish, FALSE, mpeg, NULL); ++#endif + ++#if 0 + pspec = g_param_spec_float ("rc-qmod-amp", "Ratecontrol Mod", + "Ratecontrol Mod", 0, 99.0f, 0, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.rc_qmod_amp, FALSE, mpeg, NULL); ++#endif + ++#if 0 + pspec = g_param_spec_int ("rc-qmod-freq", "Ratecontrol Freq", + "Ratecontrol Freq", 0, 0, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.rc_qmod_freq, FALSE, mpeg, NULL); ++#endif + + pspec = g_param_spec_int ("rc-buffer-size", "Ratecontrol Buffer Size", + "Decoder bitstream buffer size", 0, G_MAXINT, 0, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.rc_buffer_size, FALSE, mpeg, NULL); + ++#if 0 + pspec = + g_param_spec_float ("rc-buffer-aggressivity", + "Ratecontrol Buffer Aggressivity", "Ratecontrol Buffer Aggressivity", 0, + 99.0f, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.rc_buffer_aggressivity, FALSE, mpeg, + NULL); ++#endif + + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT (57, 3, 0) + pspec = g_param_spec_int ("rc-max-rate", "Ratecontrol Maximum Bitrate", +@@ -529,17 +538,21 @@ gst_ffmpeg_cfg_init (void) + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.rc_min_rate, FALSE, mpeg, NULL); + ++#if 0 + pspec = + g_param_spec_float ("rc-initial-cplx", + "Initial Complexity for Pass 1 Ratecontrol", + "Initial Complexity for Pass 1 Ratecontrol", 0, 9999999.0f, 0, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.rc_initial_cplx, FALSE, mpeg, NULL); ++#endif + ++#if 0 + pspec = g_param_spec_string ("rc-eq", "Ratecontrol Equation", + "Ratecontrol Equation", "tex^qComp", + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.rc_eq, FALSE, mpeg, NULL); ++#endif + + pspec = g_param_spec_float ("b-quant-factor", "B-Quantizer Factor", + "Factor in B-Frame Quantizer Computation", +@@ -630,19 +643,23 @@ gst_ffmpeg_cfg_init (void) + 0, 16000, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.me_range, FALSE, mpeg, NULL); + ++#if 0 + pspec = g_param_spec_int ("intra-quant-bias", + "Intra Quantizer Bias", + "Intra Quantizer Bias", +- -1000000, 1000000, FF_DEFAULT_QUANT_BIAS, ++ -1000000, 1000000, AV_DEFAULT_QUANT_BIAS, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.intra_quant_bias, FALSE, mpeg, NULL); ++#endif + ++#if 0 + pspec = g_param_spec_int ("inter-quant-bias", + "Inter Quantizer Bias", + "Inter Quantizer Bias", +- -1000000, 1000000, FF_DEFAULT_QUANT_BIAS, ++ -1000000, 1000000, AV_DEFAULT_QUANT_BIAS, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, config.inter_quant_bias, FALSE, mpeg, NULL); ++#endif + + pspec = g_param_spec_int ("noise-reduction", + "Noise Reduction", +diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c +index 9a72033..6b66bb9 100644 +--- a/ext/libav/gstavcodecmap.c ++++ b/ext/libav/gstavcodecmap.c +@@ -825,10 +825,10 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id, + if (encode && context) { + + gst_caps_set_simple (caps, +- "annex-f", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_4MV, +- "annex-j", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_LOOP_FILTER, +- "annex-i", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED, +- "annex-t", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED, ++ "annex-f", G_TYPE_BOOLEAN, context->flags & AV_CODEC_FLAG_4MV, ++ "annex-j", G_TYPE_BOOLEAN, context->flags & AV_CODEC_FLAG_LOOP_FILTER, ++ "annex-i", G_TYPE_BOOLEAN, context->flags & AV_CODEC_FLAG_AC_PRED, ++ "annex-t", G_TYPE_BOOLEAN, context->flags & AV_CODEC_FLAG_AC_PRED, + NULL); + } + break; +@@ -3181,7 +3181,7 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id, + * as is, as that is what most players do. */ + context->extradata = + av_mallocz (GST_ROUND_UP_16 (size * 2 + +- FF_INPUT_BUFFER_PADDING_SIZE)); ++ AV_INPUT_BUFFER_PADDING_SIZE)); + copy_config (context->extradata, data, size, &extrasize); + GST_DEBUG ("escaped size: %d", extrasize); + context->extradata_size = extrasize; +@@ -3192,7 +3192,7 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id, + GST_DEBUG ("copy codec_data"); + context->extradata = + av_mallocz (GST_ROUND_UP_16 (map.size + +- FF_INPUT_BUFFER_PADDING_SIZE)); ++ AV_INPUT_BUFFER_PADDING_SIZE)); + memcpy (context->extradata, map.data, map.size); + context->extradata_size = map.size; + } +@@ -3216,7 +3216,7 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id, + { + const gchar *mime = gst_structure_get_name (str); + +- context->flags |= CODEC_FLAG_4MV; ++ context->flags |= AV_CODEC_FLAG_4MV; + + if (!strcmp (mime, "video/x-divx")) + context->codec_tag = GST_MAKE_FOURCC ('D', 'I', 'V', 'X'); +@@ -3228,7 +3228,8 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id, + profile = gst_structure_get_string (str, "profile"); + if (profile) { + if (g_strcmp0 (profile, "advanced-simple") == 0) +- context->flags |= CODEC_FLAG_GMC | CODEC_FLAG_QPEL; ++ context->flags |= AV_CODEC_FLAG_QPEL; ++ /* FIXME use the "gmc" private option of the libxvid encoder */ + } + } + break; +@@ -3334,18 +3335,18 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id, + gboolean val; + + if (!gst_structure_get_boolean (str, "annex-f", &val) || val) +- context->flags |= CODEC_FLAG_4MV; ++ context->flags |= AV_CODEC_FLAG_4MV; + else +- context->flags &= ~CODEC_FLAG_4MV; ++ context->flags &= ~AV_CODEC_FLAG_4MV; + if ((!gst_structure_get_boolean (str, "annex-i", &val) || val) && + (!gst_structure_get_boolean (str, "annex-t", &val) || val)) +- context->flags |= CODEC_FLAG_AC_PRED; ++ context->flags |= AV_CODEC_FLAG_AC_PRED; + else +- context->flags &= ~CODEC_FLAG_AC_PRED; ++ context->flags &= ~AV_CODEC_FLAG_AC_PRED; + if (!gst_structure_get_boolean (str, "annex-j", &val) || val) +- context->flags |= CODEC_FLAG_LOOP_FILTER; ++ context->flags |= AV_CODEC_FLAG_LOOP_FILTER; + else +- context->flags &= ~CODEC_FLAG_LOOP_FILTER; ++ context->flags &= ~AV_CODEC_FLAG_LOOP_FILTER; + break; + } + case AV_CODEC_ID_ADPCM_G726: +diff --git a/ext/libav/gstavcodecmap.h b/ext/libav/gstavcodecmap.h +index 9575e77..14cdfce 100644 +--- a/ext/libav/gstavcodecmap.h ++++ b/ext/libav/gstavcodecmap.h +@@ -155,7 +155,7 @@ gst_ffmpeg_formatid_to_caps (const gchar *format_name); + + /* + * _formatid_get_codecids () can be used to get the codecIDs +- * (CODEC_ID_NONE-terminated list) that fit that specific ++ * (AV_CODEC_ID_NONE-terminated list) that fit that specific + * output format. + */ + +diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c +index f9c6096..0ed4b23 100644 +--- a/ext/libav/gstavviddec.c ++++ b/ext/libav/gstavviddec.c +@@ -237,7 +237,7 @@ gst_ffmpegviddec_class_init (GstFFMpegVidDecClass * klass) + DEFAULT_OUTPUT_CORRUPT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + caps = klass->in_plugin->capabilities; +- if (caps & (CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS)) { ++ if (caps & (AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS)) { + g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_THREADS, + g_param_spec_int ("max-threads", "Maximum decode threads", + "Maximum number of worker threads to spawn. (0 = auto)", +@@ -365,7 +365,7 @@ gst_ffmpegviddec_open (GstFFMpegVidDec * ffmpegdec) + oclass->in_plugin->name, oclass->in_plugin->id); + + gst_ffmpegviddec_context_set_flags (ffmpegdec->context, +- CODEC_FLAG_OUTPUT_CORRUPT, ffmpegdec->output_corrupt); ++ AV_CODEC_FLAG_OUTPUT_CORRUPT, ffmpegdec->output_corrupt); + + return TRUE; + +@@ -495,7 +495,7 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, + gboolean is_live; + + if (ffmpegdec->max_threads == 0) { +- if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS)) ++ if (!(oclass->in_plugin->capabilities & AV_CODEC_CAP_AUTO_THREADS)) + ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads (); + else + ffmpegdec->context->thread_count = 0; +@@ -624,10 +624,7 @@ gst_ffmpegvideodec_prepare_dr_pool (GstFFMpegVidDec * ffmpegdec, + avcodec_align_dimensions2 (ffmpegdec->context, &width, &height, + linesize_align); + +- if (ffmpegdec->context->flags & CODEC_FLAG_EMU_EDGE) +- edge = 0; +- else +- edge = avcodec_get_edge_width (); ++ edge = 0; + + /* increase the size for the padding */ + width += edge << 1; +@@ -732,7 +729,7 @@ gst_ffmpegviddec_can_direct_render (GstFFMpegVidDec * ffmpegdec) + return FALSE; + + oclass = (GstFFMpegVidDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec)); +- return ((oclass->in_plugin->capabilities & CODEC_CAP_DR1) == CODEC_CAP_DR1); ++ return ((oclass->in_plugin->capabilities & AV_CODEC_CAP_DR1) == AV_CODEC_CAP_DR1); + } + + /* called when ffmpeg wants us to allocate a buffer to write the decoded frame +@@ -1769,7 +1766,7 @@ gst_ffmpegviddec_drain (GstVideoDecoder * decoder) + + oclass = (GstFFMpegVidDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec)); + +- if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) { ++ if (oclass->in_plugin->capabilities & AV_CODEC_CAP_DELAY) { + gint have_data, len; + GstFlowReturn ret; + +@@ -1815,10 +1812,10 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder, + bsize = minfo.size; + + if (bsize > 0 && (!GST_MEMORY_IS_ZERO_PADDED (minfo.memory) +- || (minfo.maxsize - minfo.size) < FF_INPUT_BUFFER_PADDING_SIZE)) { ++ || (minfo.maxsize - minfo.size) < AV_INPUT_BUFFER_PADDING_SIZE)) { + /* add padding */ +- if (ffmpegdec->padded_size < bsize + FF_INPUT_BUFFER_PADDING_SIZE) { +- ffmpegdec->padded_size = bsize + FF_INPUT_BUFFER_PADDING_SIZE; ++ if (ffmpegdec->padded_size < bsize + AV_INPUT_BUFFER_PADDING_SIZE) { ++ ffmpegdec->padded_size = bsize + AV_INPUT_BUFFER_PADDING_SIZE; + ffmpegdec->padded = g_realloc (ffmpegdec->padded, ffmpegdec->padded_size); + GST_LOG_OBJECT (ffmpegdec, "resized padding buffer to %d", + ffmpegdec->padded_size); +@@ -1826,7 +1823,7 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder, + GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, ffmpegdec, + "Copy input to add padding"); + memcpy (ffmpegdec->padded, bdata, bsize); +- memset (ffmpegdec->padded + bsize, 0, FF_INPUT_BUFFER_PADDING_SIZE); ++ memset (ffmpegdec->padded + bsize, 0, AV_INPUT_BUFFER_PADDING_SIZE); + + bdata = ffmpegdec->padded; + do_padding = TRUE; +@@ -1835,7 +1832,7 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder, + } + + do { +- guint8 tmp_padding[FF_INPUT_BUFFER_PADDING_SIZE]; ++ guint8 tmp_padding[AV_INPUT_BUFFER_PADDING_SIZE]; + + /* parse, if at all possible */ + data = bdata; +@@ -1845,8 +1842,8 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder, + /* add temporary padding */ + GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, ffmpegdec, + "Add temporary input padding"); +- memcpy (tmp_padding, data + size, FF_INPUT_BUFFER_PADDING_SIZE); +- memset (data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE); ++ memcpy (tmp_padding, data + size, AV_INPUT_BUFFER_PADDING_SIZE); ++ memset (data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE); + } + + /* decode a frame of audio/video now */ +@@ -1862,7 +1859,7 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder, + } + + if (do_padding) { +- memcpy (data + size, tmp_padding, FF_INPUT_BUFFER_PADDING_SIZE); ++ memcpy (data + size, tmp_padding, AV_INPUT_BUFFER_PADDING_SIZE); + } + + if (len == 0 && have_data == 0) { +@@ -2143,7 +2140,7 @@ gst_ffmpegviddec_propose_allocation (GstVideoDecoder * decoder, + gst_allocation_params_init (¶ms); + params.flags = GST_MEMORY_FLAG_ZERO_PADDED; + params.align = DEFAULT_STRIDE_ALIGN; +- params.padding = FF_INPUT_BUFFER_PADDING_SIZE; ++ params.padding = AV_INPUT_BUFFER_PADDING_SIZE; + /* we would like to have some padding so that we don't have to + * memcpy. We don't suggest an allocator. */ + gst_query_add_allocation_param (query, NULL, ¶ms); +diff --git a/ext/libav/gstavvidenc.c b/ext/libav/gstavvidenc.c +index 36143f5..22e5cae 100644 +--- a/ext/libav/gstavvidenc.c ++++ b/ext/libav/gstavvidenc.c +@@ -68,18 +68,19 @@ enum + PROP_CFG_BASE, + }; + ++#if 0 + #define GST_TYPE_ME_METHOD (gst_ffmpegvidenc_me_method_get_type()) + static GType + gst_ffmpegvidenc_me_method_get_type (void) + { + static GType ffmpegenc_me_method_type = 0; + static GEnumValue ffmpegenc_me_methods[] = { +- {ME_ZERO, "None (Very low quality)", "zero"}, +- {ME_FULL, "Full (Slow, unmaintained)", "full"}, +- {ME_LOG, "Logarithmic (Low quality, unmaintained)", "logarithmic"}, +- {ME_PHODS, "phods (Low quality, unmaintained)", "phods"}, +- {ME_EPZS, "EPZS (Best quality, Fast)", "epzs"}, +- {ME_X1, "X1 (Experimental)", "x1"}, ++ {FF_CMP_ZERO, "None (Very low quality)", "zero"}, ++ {FF_CMP_FULL, "Full (Slow, unmaintained)", "full"}, ++ {FF_CMP_LOG, "Logarithmic (Low quality, unmaintained)", "logarithmic"}, ++ {FF_CMP_PHODS, "phods (Low quality, unmaintained)", "phods"}, ++ {FF_CMP_EPZS, "EPZS (Best quality, Fast)", "epzs"}, ++ {FF_CMP_X1, "X1 (Experimental)", "x1"}, + {0, NULL, NULL}, + }; + if (!ffmpegenc_me_method_type) { +@@ -88,6 +89,7 @@ gst_ffmpegvidenc_me_method_get_type (void) + } + return ffmpegenc_me_method_type; + } ++#endif + + /* A number of function prototypes are given so we can refer to them later. */ + static void gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass); +@@ -201,10 +203,12 @@ gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass) + g_param_spec_int ("gop-size", "GOP Size", + "Number of frames within one GOP", 0, G_MAXINT, + DEFAULT_VIDEO_GOP_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++#if 0 + g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_ME_METHOD, + g_param_spec_enum ("me-method", "ME Method", "Motion Estimation Method", +- GST_TYPE_ME_METHOD, ME_EPZS, ++ GST_TYPE_ME_METHOD, FF_CMP_EPZS, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++#endif + + g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFSIZE, + g_param_spec_int ("buffer-size", "Buffer Size", +@@ -216,7 +220,7 @@ gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass) + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + caps = klass->in_plugin->capabilities; +- if (caps & (CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS)) { ++ if (caps & (AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS)) { + g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_THREADS, + g_param_spec_int ("max-threads", "Maximum encode threads", + "Maximum number of worker threads to spawn. (0 = auto)", +@@ -259,7 +263,7 @@ gst_ffmpegvidenc_init (GstFFMpegVidEnc * ffmpegenc) + ffmpegenc->file = NULL; + + ffmpegenc->bitrate = DEFAULT_VIDEO_BITRATE; +- ffmpegenc->me_method = ME_EPZS; ++ //ffmpegenc->me_method = FF_CMP_EPZS; + ffmpegenc->buffer_size = 512 * 1024; + ffmpegenc->gop_size = DEFAULT_VIDEO_GOP_SIZE; + ffmpegenc->rtp_payload_size = 0; +@@ -321,12 +325,12 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder, + ffmpegenc->context->bit_rate = ffmpegenc->bitrate; + ffmpegenc->context->bit_rate_tolerance = ffmpegenc->bitrate; + ffmpegenc->context->gop_size = ffmpegenc->gop_size; +- ffmpegenc->context->me_method = ffmpegenc->me_method; ++ //ffmpegenc->context->me_method = ffmpegenc->me_method; + GST_DEBUG_OBJECT (ffmpegenc, "Setting avcontext to bitrate %d, gop_size %d", + ffmpegenc->bitrate, ffmpegenc->gop_size); + + if (ffmpegenc->max_threads == 0) { +- if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS)) ++ if (!(oclass->in_plugin->capabilities & AV_CODEC_CAP_AUTO_THREADS)) + ffmpegenc->context->thread_count = gst_ffmpeg_auto_max_threads (); + else + ffmpegenc->context->thread_count = 0; +@@ -343,16 +347,16 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder, + gst_ffmpeg_cfg_fill_context (ffmpegenc, ffmpegenc->context); + + /* then handle some special cases */ +- ffmpegenc->context->lmin = (ffmpegenc->lmin * FF_QP2LAMBDA + 0.5); +- ffmpegenc->context->lmax = (ffmpegenc->lmax * FF_QP2LAMBDA + 0.5); ++ ffmpegenc->context->qmin = (ffmpegenc->lmin * FF_QP2LAMBDA + 0.5); ++ ffmpegenc->context->qmax = (ffmpegenc->lmax * FF_QP2LAMBDA + 0.5); + + if (ffmpegenc->interlaced) { + ffmpegenc->context->flags |= +- CODEC_FLAG_INTERLACED_DCT | CODEC_FLAG_INTERLACED_ME; ++ AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME; + } + + /* some other defaults */ +- ffmpegenc->context->rc_strategy = 2; ++ //ffmpegenc->context->rc_strategy = 2; + ffmpegenc->context->b_frame_strategy = 0; + ffmpegenc->context->coder_type = 0; + ffmpegenc->context->context_model = 0; +@@ -362,18 +366,18 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder, + ffmpegenc->context->flags |= ffmpegenc->pass; + switch (ffmpegenc->pass) { + /* some additional action depends on type of pass */ +- case CODEC_FLAG_QSCALE: ++ case AV_CODEC_FLAG_QSCALE: + ffmpegenc->context->global_quality + = ffmpegenc->picture->quality = FF_QP2LAMBDA * ffmpegenc->quantizer; + break; +- case CODEC_FLAG_PASS1: /* need to prepare a stats file */ ++ case AV_CODEC_FLAG_PASS1: /* need to prepare a stats file */ + /* we don't close when changing caps, fingers crossed */ + if (!ffmpegenc->file) + ffmpegenc->file = g_fopen (ffmpegenc->filename, "w"); + if (!ffmpegenc->file) + goto open_file_err; + break; +- case CODEC_FLAG_PASS2: ++ case AV_CODEC_FLAG_PASS2: + { /* need to read the whole stats file ! */ + gsize size; + From patchwork Sun Aug 12 20:32:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 956728 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.138; helo=whitealder.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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41pW0l5gCGz9sD2 for ; Mon, 13 Aug 2018 06:38:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4A11F85D61; Sun, 12 Aug 2018 20:32:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fm-bYwHMdybD; Sun, 12 Aug 2018 20:32:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id AE01A85CDE; Sun, 12 Aug 2018 20:32:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id B80131C2613 for ; Sun, 12 Aug 2018 20:32:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B54588596B for ; Sun, 12 Aug 2018 20:32:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xeLTEbrfvR6u for ; Sun, 12 Aug 2018 20:32:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout04.t-online.de (mailout04.t-online.de [194.25.134.18]) by hemlock.osuosl.org (Postfix) with ESMTPS id 5532D858BB for ; Sun, 12 Aug 2018 20:32:22 +0000 (UTC) Received: from fwd01.aul.t-online.de (fwd01.aul.t-online.de [172.20.27.147]) by mailout04.t-online.de (Postfix) with SMTP id 02F3341950C6; Sun, 12 Aug 2018 22:32:21 +0200 (CEST) Received: from fli4l.lan.fli4l (SmUFr4ZEQhkuZ-b8wGbhGXgDULrafYUouf2QNXmaqq3bou7ydA2rwHoG7WuqdbUw-Y@[84.161.177.252]) by fwd01.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1fox20-1IjVGC0; Sun, 12 Aug 2018 22:32:08 +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 1fox1z-00085e-Ip; Sun, 12 Aug 2018 22:32:08 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 12 Aug 2018 22:32:03 +0200 Message-Id: <20180812203205.7251-4-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: SmUFr4ZEQhkuZ-b8wGbhGXgDULrafYUouf2QNXmaqq3bou7ydA2rwHoG7WuqdbUw-Y X-TOI-MSGID: e216eb70-9822-4f9e-b1c8-aaf956270707 Subject: [Buildroot] [PATCH/next 4/6] package/mediastreamer: 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/mediastreamer/0002-ffmpeg4.patch | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 package/mediastreamer/0002-ffmpeg4.patch diff --git a/package/mediastreamer/0002-ffmpeg4.patch b/package/mediastreamer/0002-ffmpeg4.patch new file mode 100644 index 0000000000..e0424e09b6 --- /dev/null +++ b/package/mediastreamer/0002-ffmpeg4.patch @@ -0,0 +1,30 @@ +Fix build with ffmpeg4 + +videofilters/nowebcam.c:251:49: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE' + jpgbuf=(uint8_t*)ms_malloc0(statbuf.st_size + FF_INPUT_BUFFER_PADDING_SIZE); + ^ +Downloaded from +https://svnweb.freebsd.org/ports/head/net/mediastreamer/files/patch-src_videofilters_nowebcam.c?view=markup + +Signed-off-by: Bernd Kuhls + +--- a/src/videofilters/nowebcam.c.orig 2016-08-18 14:17:37 UTC ++++ b/src/videofilters/nowebcam.c +@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, + #ifndef NO_FFMPEG + #include "ffmpeg-priv.h" + #else +-#define FF_INPUT_BUFFER_PADDING_SIZE 32 ++#define AV_INPUT_BUFFER_PADDING_SIZE 32 + #endif + + #if TARGET_OS_IPHONE +@@ -248,7 +248,7 @@ static mblk_t *_ms_load_jpeg_as_yuv(const char *jpgpat + ms_error("Cannot load %s",jpgpath); + return NULL; + } +- jpgbuf=(uint8_t*)ms_malloc0(statbuf.st_size + FF_INPUT_BUFFER_PADDING_SIZE); ++ jpgbuf=(uint8_t*)ms_malloc0(statbuf.st_size + AV_INPUT_BUFFER_PADDING_SIZE); + if (jpgbuf==NULL) + { + close(fd); From patchwork Sun Aug 12 20:32:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 956706 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.133; helo=hemlock.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41pVsV03cNz9s8T for ; Mon, 13 Aug 2018 06:32:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 13BD3858BB; Sun, 12 Aug 2018 20:32:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qfY4KAVCIv1X; Sun, 12 Aug 2018 20:32:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 689E18596B; Sun, 12 Aug 2018 20:32:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 285701C2613 for ; Sun, 12 Aug 2018 20:32:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 24E31226C1 for ; Sun, 12 Aug 2018 20:32:24 +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 2WoaF8rvd7m7 for ; Sun, 12 Aug 2018 20:32:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout04.t-online.de (mailout04.t-online.de [194.25.134.18]) by silver.osuosl.org (Postfix) with ESMTPS id 5E31B226BF for ; Sun, 12 Aug 2018 20:32:18 +0000 (UTC) Received: from fwd13.aul.t-online.de (fwd13.aul.t-online.de [172.20.27.62]) by mailout04.t-online.de (Postfix) with SMTP id 0EA7641950C6; Sun, 12 Aug 2018 22:32:17 +0200 (CEST) Received: from fli4l.lan.fli4l (ZZW-VGZOohj79vWasLQdAaV2aneb5KiI53Q6jtmMFF396eBHrmn6e8+McAXL8cHQLW@[84.161.177.252]) by fwd13.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1fox21-1kFDdI0; Sun, 12 Aug 2018 22:32:09 +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 1fox20-00085e-4L; Sun, 12 Aug 2018 22:32:08 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 12 Aug 2018 22:32:04 +0200 Message-Id: <20180812203205.7251-5-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: ZZW-VGZOohj79vWasLQdAaV2aneb5KiI53Q6jtmMFF396eBHrmn6e8+McAXL8cHQLW X-TOI-MSGID: dc98d948-7c4d-45d3-b657-317256e377cb Subject: [Buildroot] [PATCH/next 5/6] package/motion: 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/motion/0001-ffmpeg40.patch | 57 ++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/motion/0001-ffmpeg40.patch diff --git a/package/motion/0001-ffmpeg40.patch b/package/motion/0001-ffmpeg40.patch new file mode 100644 index 0000000000..f3cdfa93b4 --- /dev/null +++ b/package/motion/0001-ffmpeg40.patch @@ -0,0 +1,57 @@ +From ff99988d57f4bcb0a7b381374f8106896bda2b15 Mon Sep 17 00:00:00 2001 +From: James Cowgill +Date: Fri, 23 Feb 2018 23:04:33 +0000 +Subject: [PATCH] Fix build errors with FFmpeg 4.0 + +Downloaded from +https://sources.debian.org/src/motion/4.1.1-1.1/debian/patches/ffmpeg4.0.patch/ + +Instead of backporting +https://github.com/Motion-Project/motion/commit/9b93a417e37e1f0fef58d1582a7e98e4c05d3b42 +from upstream master branch we use the patch from Debian. + +Signed-off-by: Bernd Kuhls +--- + ffmpeg.c | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) + +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -68,6 +68,19 @@ + #endif + + /*********************************************/ ++#if (LIBAVCODEC_VERSION_MAJOR >= 57) ++ ++#define MY_CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++#define MY_CODEC_FLAG_QSCALE AV_CODEC_FLAG_QSCALE ++ ++#else ++ ++#define MY_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER ++#define MY_CODEC_FLAG_QSCALE CODEC_FLAG_QSCALE ++ ++#endif ++ ++/*********************************************/ + AVFrame *my_frame_alloc(void){ + AVFrame *pic; + #if (LIBAVFORMAT_VERSION_MAJOR >= 55) +@@ -538,7 +551,7 @@ + /* The selection of 8000 in the else is a subjective number based upon viewing output files */ + if (ffmpeg->vbr > 0){ + ffmpeg->vbr =(int)(((100-ffmpeg->vbr)*(100-ffmpeg->vbr)*(100-ffmpeg->vbr) * 8000) / 1000000) + 1; +- ffmpeg->ctx_codec->flags |= CODEC_FLAG_QSCALE; ++ ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_QSCALE; + ffmpeg->ctx_codec->global_quality=ffmpeg->vbr; + } + } +@@ -663,7 +676,7 @@ + ffmpeg->ctx_codec->strict_std_compliance = -2; + ffmpeg->ctx_codec->level = 3; + } +- ffmpeg->ctx_codec->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_GLOBAL_HEADER; + + retcd = ffmpeg_set_quality(ffmpeg); + if (retcd < 0){ From patchwork Sun Aug 12 20:32:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 956727 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.138; helo=whitealder.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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41pW0l1zrHz9s9l for ; Mon, 13 Aug 2018 06:38:46 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8D46385C3F; Sun, 12 Aug 2018 20:32:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Hu3lGXd4vIr; Sun, 12 Aug 2018 20:32:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id E3340857C2; Sun, 12 Aug 2018 20:32:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id BC2151C2613 for ; Sun, 12 Aug 2018 20:32:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B5DB6220B8 for ; Sun, 12 Aug 2018 20:32:14 +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 bPSJFK32bUOJ for ; Sun, 12 Aug 2018 20:32:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) by silver.osuosl.org (Postfix) with ESMTPS id C954C22011 for ; Sun, 12 Aug 2018 20:32:12 +0000 (UTC) Received: from fwd34.aul.t-online.de (fwd34.aul.t-online.de [172.20.26.145]) by mailout07.t-online.de (Postfix) with SMTP id 028E242DC18F; Sun, 12 Aug 2018 22:32:10 +0200 (CEST) Received: from fli4l.lan.fli4l (VasPtaZrwhOFrTgXw+msXJgHGIFtoSp06n-85bMt23k5NjO7TKLhQPgG1USHLUxgrm@[84.161.177.252]) by fwd34.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1fox21-1K3Amm0; Sun, 12 Aug 2018 22:32:09 +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 1fox20-00085e-LY; Sun, 12 Aug 2018 22:32:09 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 12 Aug 2018 22:32:05 +0200 Message-Id: <20180812203205.7251-6-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: VasPtaZrwhOFrTgXw+msXJgHGIFtoSp06n-85bMt23k5NjO7TKLhQPgG1USHLUxgrm X-TOI-MSGID: a58f582f-00b8-46fc-a596-46e295e03024 Subject: [Buildroot] [PATCH/next 6/6] package/squeezelite: 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/squeezelite/0004-ffmpeg4.0.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 package/squeezelite/0004-ffmpeg4.0.patch diff --git a/package/squeezelite/0004-ffmpeg4.0.patch b/package/squeezelite/0004-ffmpeg4.0.patch new file mode 100644 index 0000000000..55f194f10a --- /dev/null +++ b/package/squeezelite/0004-ffmpeg4.0.patch @@ -0,0 +1,21 @@ +Description: Fix FTBFS with FFmpeg 4.0 +Author: James Cowgill +Bug-Debian: https://bugs.debian.org/888335 + +Downloaded from Debian: +https://sources.debian.org/src/squeezelite/1.8-4.1/debian/patches/ffmpeg4.0.patch/ + +Signed-off-by: Bernd Kuhls +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -264,7 +264,7 @@ static decode_state ff_decode(void) { + ff->mmsh_bytes_left = ff->mmsh_bytes_pad = ff->mmsh_packet_len = 0; + + if (!ff->readbuf) { +- ff->readbuf = AV(ff, malloc, READ_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); ++ ff->readbuf = AV(ff, malloc, READ_SIZE + AV_INPUT_BUFFER_PADDING_SIZE); + } + + avio = AVIO(ff, alloc_context, ff->readbuf, READ_SIZE, 0, NULL, _read_data, NULL, NULL);