aboutsummaryrefslogtreecommitdiffstats
path: root/main/freerdp
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-10-10 07:02:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-10-10 12:26:53 +0000
commiteeb742c31bd758126094ee714a0e8aa1e52c0826 (patch)
treeb31b973cdc6b39eebc7ba1ef68489579c2993289 /main/freerdp
parent43916f720f07d76d3ae88a67971588b10d02024e (diff)
downloadaports-eeb742c31bd758126094ee714a0e8aa1e52c0826.tar.bz2
aports-eeb742c31bd758126094ee714a0e8aa1e52c0826.tar.xz
main/freerdp: rebuild against ffmpeg-2.0
Diffstat (limited to 'main/freerdp')
-rw-r--r--main/freerdp/APKBUILD17
-rw-r--r--main/freerdp/ffmpeg2.0.patch76
2 files changed, 90 insertions, 3 deletions
diff --git a/main/freerdp/APKBUILD b/main/freerdp/APKBUILD
index 19421bb56c..c6767b38b7 100644
--- a/main/freerdp/APKBUILD
+++ b/main/freerdp/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=freerdp
pkgver=1.0.2
-pkgrel=1
+pkgrel=2
pkgdesc="Free RDP client"
url="http://freerdp.sourceforge.net"
arch="all"
@@ -13,7 +13,9 @@ makedepends="openssl-dev libxcursor-dev cups-dev alsa-lib-dev ffmpeg-dev
cmake"
source="https://github.com/FreeRDP/FreeRDP/archive/$pkgver.tar.gz
pluginpath.patch
- futimens.patch"
+ futimens.patch
+ ffmpeg2.0.patch
+ "
_builddir="$srcdir"/FreeRDP-$pkgver
prepare() {
@@ -56,4 +58,13 @@ plugins() {
md5sums="c260051a94caff590def5caa4fcf59d6 1.0.2.tar.gz
f18b6a675341d8e9755941afd4fc8d82 pluginpath.patch
-b9673acd41c4205cd32e5412dcb07515 futimens.patch"
+b9673acd41c4205cd32e5412dcb07515 futimens.patch
+1260eecf01ea5212e2db8ac9c5e7fa6d ffmpeg2.0.patch"
+sha256sums="c0f137df7ab6fb76d7e7d316ae4e0ca6caf356e5bc0b5dadbdfadea5db992df1 1.0.2.tar.gz
+765fc48fc6a044277a2091ec02b7051721374090e9c7c3da4b9b8b7db0f10349 pluginpath.patch
+4035df44a9883197c832b6141e9e372db371a8148e5ba3a8c011e543e8d10d3f futimens.patch
+d7dbe684404713fc3ec6479a91aa8215e6d28ebb18ea66456134edfa134e3750 ffmpeg2.0.patch"
+sha512sums="370b30e05bc125c69fd06583ab747f885e1bf41b47a68c0e326208f22be06e48a4163f4632085767c76aaeabda95b6ab9d285784fd33a73f7d404c9517d54f3c 1.0.2.tar.gz
+714d111a6407b0408e8b9cd6acf8df381fe1d2347339d16833980aff61fe0f273f4d506c15bd415174aabe644f56311c990d7d5dfb98f61d6f64e6925e37a11a pluginpath.patch
+455e41b8237c01935f6c845f16065bd8667c5b6feba6c9c9ce63544203405686d5da8845fe35eb10a3f725d8f540e5fbafccb9d207f7deea2c17eb447daaaaff futimens.patch
+fa67829b6be3703fb2ce38f814265b32331375c46c194fd0677165055ebb4bc53ccbe2011d9ab67be1ed31b29543e6f14f1b11e99268de557664864717d1378e ffmpeg2.0.patch"
diff --git a/main/freerdp/ffmpeg2.0.patch b/main/freerdp/ffmpeg2.0.patch
new file mode 100644
index 0000000000..bc9022da47
--- /dev/null
+++ b/main/freerdp/ffmpeg2.0.patch
@@ -0,0 +1,76 @@
+diff -rupN a/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c b/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c
+--- a/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c 2013-01-02 22:46:59.000000000 +0100
++++ b/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c 2013-07-22 18:12:18.001576713 +0200
+@@ -28,6 +28,8 @@
+ #include "tsmf_constants.h"
+ #include "tsmf_decoder.h"
+
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
++
+ /* Compatibility with older FFmpeg */
+ #if LIBAVUTIL_VERSION_MAJOR < 50
+ #define AVMEDIA_TYPE_VIDEO 0
+@@ -39,7 +41,7 @@ typedef struct _TSMFFFmpegDecoder
+ ITSMFDecoder iface;
+
+ int media_type;
+- enum CodecID codec_id;
++ enum AVCodecID codec_id;
+ AVCodecContext* codec_context;
+ AVCodec* codec;
+ AVFrame* frame;
+@@ -54,7 +56,7 @@ static boolean tsmf_ffmpeg_init_context(
+ {
+ TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
+
+- mdecoder->codec_context = avcodec_alloc_context();
++ mdecoder->codec_context = avcodec_alloc_context3(NULL);
+ if (!mdecoder->codec_context)
+ {
+ DEBUG_WARN("avcodec_alloc_context failed.");
+@@ -88,16 +90,6 @@ static boolean tsmf_ffmpeg_init_audio_st
+ mdecoder->codec_context->channels = media_type->Channels;
+ mdecoder->codec_context->block_align = media_type->BlockAlign;
+
+-#ifdef AV_CPU_FLAG_SSE2
+- mdecoder->codec_context->dsp_mask = AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2;
+-#else
+-#if LIBAVCODEC_VERSION_MAJOR < 53
+- mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMXEXT;
+-#else
+- mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMX2;
+-#endif
+-#endif
+-
+ return true;
+ }
+
+@@ -174,7 +166,7 @@ static boolean tsmf_ffmpeg_prepare(ITSMF
+ {
+ TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
+
+- if (avcodec_open(mdecoder->codec_context, mdecoder->codec) < 0)
++ if (avcodec_open2(mdecoder->codec_context, mdecoder->codec, NULL) < 0)
+ {
+ DEBUG_WARN("avcodec_open failed.");
+ return false;
+@@ -372,8 +364,9 @@ static boolean tsmf_ffmpeg_decode_audio(
+ av_init_packet(&pkt);
+ pkt.data = (uint8*) src;
+ pkt.size = src_size;
+- len = avcodec_decode_audio3(mdecoder->codec_context,
+- (int16_t*) dst, &frame_size, &pkt);
++ AVFrame * frame = avcodec_alloc_frame ();
++ len = avcodec_decode_audio4(mdecoder->codec_context,
++ frame, &frame_size, &pkt);
+ }
+ #endif
+ if (len <= 0 || frame_size <= 0)
+@@ -499,7 +492,6 @@ TSMFDecoderEntry(void)
+
+ if (!initialized)
+ {
+- avcodec_init();
+ avcodec_register_all();
+ initialized = true;
+ }