From patchwork Tue Mar 29 20:30:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 603141 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 3qZMqT3MnYz9sC3 for ; Wed, 30 Mar 2016 07:31:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5D367A5E6E; Tue, 29 Mar 2016 20:30:58 +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 1TDCqfqyLyqr; Tue, 29 Mar 2016 20:30:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5A6348B091; Tue, 29 Mar 2016 20:30:49 +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 0C0911C1F4D for ; Tue, 29 Mar 2016 20:30:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 078F72F32A for ; Tue, 29 Mar 2016 20:30:48 +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 kmSFEyll0T92 for ; Tue, 29 Mar 2016 20:30:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout03.t-online.de (mailout03.t-online.de [194.25.134.81]) by silver.osuosl.org (Postfix) with ESMTPS id 151CA267D8 for ; Tue, 29 Mar 2016 20:30:45 +0000 (UTC) Received: from fwd11.aul.t-online.de (fwd11.aul.t-online.de [172.20.27.152]) by mailout03.t-online.de (Postfix) with SMTP id BB5A63EE30F for ; Tue, 29 Mar 2016 22:30:43 +0200 (CEST) Received: from fli4l.lan.fli4l (GuvsGgZlohLYatO9zwQvimQTFDimbMywYayNdymeJHol4T0XFJQXwW0Pzami03pQ9L@[84.178.240.79]) by fwd11.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1al0Hh-2EuRmK0; Tue, 29 Mar 2016 22:30:41 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:37158 helo=kuhls.lan.fli4l) by fli4l.lan.fli4l with esmtp (Exim 4.87) (envelope-from ) id 1al0Hg-0007Ct-N5; Tue, 29 Mar 2016 22:30:41 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 29 Mar 2016 22:30:39 +0200 Message-Id: <1459283439-30933-2-git-send-email-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1459283439-30933-1-git-send-email-bernd.kuhls@t-online.de> References: <1459283439-30933-1-git-send-email-bernd.kuhls@t-online.de> X-ID: GuvsGgZlohLYatO9zwQvimQTFDimbMywYayNdymeJHol4T0XFJQXwW0Pzami03pQ9L X-TOI-MSGID: 645eac56-953f-4378-978f-daa04ea071d4 Cc: Bernd Kuhls Subject: [Buildroot] [PATCH 2/2] package/freerdp: add support for ffmpeg 3.0 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Bernd Kuhls --- package/freerdp/0004-ffmpeg30.patch | 74 +++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 package/freerdp/0004-ffmpeg30.patch diff --git a/package/freerdp/0004-ffmpeg30.patch b/package/freerdp/0004-ffmpeg30.patch new file mode 100644 index 0000000..a7998b7 --- /dev/null +++ b/package/freerdp/0004-ffmpeg30.patch @@ -0,0 +1,74 @@ +From b7b66968f93f6ce75dd06d12638e14029bf3717b Mon Sep 17 00:00:00 2001 +From: Alexis Ballier +Date: Thu, 17 Sep 2015 10:36:44 +0200 +Subject: [PATCH] channels/tsmf/client/ffmpeg: Fix build with ffmpeg git + master. + +Replace old, deprecated and now removed, APIs with their new equivalent while retaining backward compatibility with old ffmpeg versions. + +Signed-off-by: Bernd Kuhls +[Downloaded from upstream commit: + https://github.com/FreeRDP/FreeRDP/commit/f8ceb3f6061583c650bd4f6cddc10bc0471f2076] +--- + channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c +index d0880e7..e1b9f83 100644 +--- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c ++++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c +@@ -61,6 +61,9 @@ + #define AV_CODEC_ID_AC3 CODEC_ID_AC3 + #endif + ++#if LIBAVUTIL_VERSION_MAJOR < 52 ++#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P ++#endif + + typedef struct _TSMFFFmpegDecoder + { +@@ -102,7 +105,11 @@ static BOOL tsmf_ffmpeg_init_video_stream(ITSMFDecoder* decoder, const TS_AM_MED + mdecoder->codec_context->bit_rate = media_type->BitRate; + mdecoder->codec_context->time_base.den = media_type->SamplesPerSecond.Numerator; + mdecoder->codec_context->time_base.num = media_type->SamplesPerSecond.Denominator; ++#if LIBAVCODEC_VERSION_MAJOR < 55 + mdecoder->frame = avcodec_alloc_frame(); ++#else ++ mdecoder->frame = av_frame_alloc(); ++#endif + return TRUE; + } + +@@ -328,7 +335,11 @@ static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const BYTE *data, UI + if (!mdecoder->decoded_data) + return FALSE; + ++#if LIBAVCODEC_VERSION_MAJOR < 55 + frame = avcodec_alloc_frame(); ++#else ++ frame = av_frame_alloc(); ++#endif + avpicture_fill((AVPicture*) frame, mdecoder->decoded_data, + mdecoder->codec_context->pix_fmt, + mdecoder->codec_context->width, mdecoder->codec_context->height); +@@ -400,7 +411,11 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE *data, UI + (int16_t *) dst, &frame_size, src, src_size); + #else + { ++#if LIBAVCODEC_VERSION_MAJOR < 55 + AVFrame *decoded_frame = avcodec_alloc_frame(); ++#else ++ AVFrame *decoded_frame = av_frame_alloc(); ++#endif + int got_frame = 0; + AVPacket pkt; + av_init_packet(&pkt); +@@ -480,7 +495,7 @@ static UINT32 tsmf_ffmpeg_get_decoded_format(ITSMFDecoder* decoder) + + switch (mdecoder->codec_context->pix_fmt) + { +- case PIX_FMT_YUV420P: ++ case AV_PIX_FMT_YUV420P: + return RDP_PIXFMT_I420; + default: + WLog_ERR(TAG, "unsupported pixel format %u",