From patchwork Sat Aug 25 07:31:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 962141 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 41y8wc3MgRz9s47 for ; Sat, 25 Aug 2018 17:31:44 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7B714220FE; Sat, 25 Aug 2018 07:31:40 +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 bK66SSh1PQBF; Sat, 25 Aug 2018 07:31:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 64ECD220B6; Sat, 25 Aug 2018 07:31:29 +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 458FB1BFC90 for ; Sat, 25 Aug 2018 07:31:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4348A85250 for ; Sat, 25 Aug 2018 07:31:26 +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 TzbDnlurkXr5 for ; Sat, 25 Aug 2018 07:31:25 +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 fraxinus.osuosl.org (Postfix) with ESMTPS id 23A4E85092 for ; Sat, 25 Aug 2018 07:31:25 +0000 (UTC) Received: from fwd29.aul.t-online.de (fwd29.aul.t-online.de [172.20.26.134]) by mailout07.t-online.de (Postfix) with SMTP id 144B4424BD4C; Sat, 25 Aug 2018 09:31:22 +0200 (CEST) Received: from fli4l.lan.fli4l (bpn7jGZHQhnQp+LgJv4AWObxByonBsOTuYpaBGiuipAG48fmS4nKbrkzGa0Z5zTg7a@[91.58.2.49]) by fwd29.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1ftT2X-21BvVY0; Sat, 25 Aug 2018 09:31:21 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:43088 helo=kuhls.lan.fli4l) by fli4l.lan.fli4l with esmtp (Exim 4.91) (envelope-from ) id 1ftT2W-0002N9-Hq; Sat, 25 Aug 2018 09:31:20 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sat, 25 Aug 2018 09:31:16 +0200 Message-Id: <20180825073118.14980-5-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180825073118.14980-1-bernd.kuhls@t-online.de> References: <20180825073118.14980-1-bernd.kuhls@t-online.de> X-ID: bpn7jGZHQhnQp+LgJv4AWObxByonBsOTuYpaBGiuipAG48fmS4nKbrkzGa0Z5zTg7a X-TOI-MSGID: 480a1e7e-a139-413b-b2cd-29fe7990a8c7 Subject: [Buildroot] [PATCH/next v3 5/7] 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: Sven Neumann , Romain Naour , Hiroshi Kawashima , Mahyar Koshkouei , Fabrice Fontaine MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Bernd Kuhls --- v3: re-integrated in ffmpeg bump series v2: split patch from v1 backported upstream commit (Thomas) ...001-Fix-build-errors-with-FFmpeg-4.0.patch | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch diff --git a/package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch b/package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch new file mode 100644 index 0000000000..e738809a74 --- /dev/null +++ b/package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch @@ -0,0 +1,58 @@ +From 9b93a417e37e1f0fef58d1582a7e98e4c05d3b42 Mon Sep 17 00:00:00 2001 +From: James Cowgill +Date: Sun, 25 Feb 2018 20:13:57 +0000 +Subject: [PATCH] Fix build errors with FFmpeg 4.0 + +Backported from upstream commit +https://github.com/Motion-Project/motion/commit/9b93a417e37e1f0fef58d1582a7e98e4c05d3b42 + +Signed-off-by: Bernd Kuhls +--- + ffmpeg.c | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) + +diff --git a/ffmpeg.c b/ffmpeg.c +index 1e6cdf6..4299ba3 100644 +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -67,6 +67,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; +@@ -548,7 +561,7 @@ static int ffmpeg_set_quality(struct ffmpeg *ffmpeg){ + /* The selection of 8000 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; + } + } +@@ -673,7 +686,7 @@ static int ffmpeg_set_codec(struct ffmpeg *ffmpeg){ + 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){ +-- +2.18.0 +