commit:     036cf8158e6a78596ea5a9ea3455b3784926482f
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 16 20:56:52 2015 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Wed Sep 16 20:56:59 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=036cf815

net-misc/freerdp: fix build with ffmpeg git master.

Package-Manager: portage-2.2.20.1

 net-misc/freerdp/files/freerdp-ffmpeg29.patch     | 40 +++++++++++++++++++++++
 net-misc/freerdp/freerdp-1.2.1_pre20150326.ebuild |  4 +--
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/net-misc/freerdp/files/freerdp-ffmpeg29.patch 
b/net-misc/freerdp/files/freerdp-ffmpeg29.patch
new file mode 100644
index 0000000..6113c3b
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-ffmpeg29.patch
@@ -0,0 +1,40 @@
+Index: freerdp-1.2.1_pre20150326/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+===================================================================
+--- freerdp-1.2.1_pre20150326.orig/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
++++ freerdp-1.2.1_pre20150326/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+@@ -102,7 +102,7 @@ static BOOL tsmf_ffmpeg_init_video_strea
+       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;
+-      mdecoder->frame = avcodec_alloc_frame();
++      mdecoder->frame = av_frame_alloc();
+       return TRUE;
+ }
+ 
+@@ -320,7 +320,7 @@ static BOOL tsmf_ffmpeg_decode_video(ITS
+                                                                
mdecoder->codec_context->width, mdecoder->codec_context->height);
+               mdecoder->decoded_data = malloc(mdecoder->decoded_size);
+               ZeroMemory(mdecoder->decoded_data, mdecoder->decoded_size);
+-              frame = avcodec_alloc_frame();
++              frame = av_frame_alloc();
+               avpicture_fill((AVPicture*) frame, mdecoder->decoded_data,
+                                          mdecoder->codec_context->pix_fmt,
+                                          mdecoder->codec_context->width, 
mdecoder->codec_context->height);
+@@ -389,7 +389,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITS
+                                                                       
(int16_t *) dst, &frame_size, src, src_size);
+ #else
+               {
+-                      AVFrame *decoded_frame = avcodec_alloc_frame();
++                      AVFrame *decoded_frame = av_frame_alloc();
+                       int got_frame = 0;
+                       AVPacket pkt;
+                       av_init_packet(&pkt);
+@@ -469,7 +469,7 @@ static UINT32 tsmf_ffmpeg_get_decoded_fo
+ 
+       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",

diff --git a/net-misc/freerdp/freerdp-1.2.1_pre20150326.ebuild 
b/net-misc/freerdp/freerdp-1.2.1_pre20150326.ebuild
index 4c23a32..5ca32d5 100644
--- a/net-misc/freerdp/freerdp-1.2.1_pre20150326.ebuild
+++ b/net-misc/freerdp/freerdp-1.2.1_pre20150326.ebuild
@@ -46,7 +46,7 @@ RDEPEND="
                        xv? ( x11-libs/libXv )
                )
        )
-       ffmpeg? ( virtual/ffmpeg )
+       ffmpeg? ( >=virtual/ffmpeg-9 )
        gstreamer? (
                media-libs/gstreamer:1.0
                media-libs/gst-plugins-base:1.0
@@ -80,7 +80,7 @@ DEPEND="${RDEPEND}
 
 DOCS=( README )
 
-PATCHES=( "${FILESDIR}/freerdp-armfp.patch" )
+PATCHES=( "${FILESDIR}/freerdp-armfp.patch" 
"${FILESDIR}/freerdp-ffmpeg29.patch" )
 
 src_configure() {
        local mycmakeargs=(

Reply via email to