added patch for ffmpeg 2.3.3 [release 1.0.2-2mamba;Sun Dec 06 2015]

This commit is contained in:
Silvan Calarco 2024-01-05 22:33:25 +01:00
parent ae4874f0df
commit 34e67cfcc0
2 changed files with 78 additions and 1 deletions

View File

@ -0,0 +1,72 @@
--- freerdp-1.0.2/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c.orig 2013-01-02 22:46:59.000000000 +0100
+++ freerdp-1.0.2/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c 2013-09-26 18:29:52.693695785 +0200
@@ -39,7 +39,7 @@
ITSMFDecoder iface;
int media_type;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
AVCodecContext* codec_context;
AVCodec* codec;
AVFrame* frame;
@@ -54,7 +54,7 @@
{
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 +88,6 @@
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 +164,7 @@
{
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;
@@ -337,7 +327,7 @@
#endif
if (mdecoder->decoded_size_max == 0)
- mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE + 16;
+ mdecoder->decoded_size_max = 192000 /* AVCODEC_MAX_AUDIO_FRAME_SIZE */ + 16;
mdecoder->decoded_data = xzalloc(mdecoder->decoded_size_max);
/* align the memory for SSE2 needs */
dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
@@ -348,7 +338,7 @@
while (src_size > 0)
{
/* Ensure enough space for decoding */
- if (mdecoder->decoded_size_max - mdecoder->decoded_size < AVCODEC_MAX_AUDIO_FRAME_SIZE)
+ if (mdecoder->decoded_size_max - mdecoder->decoded_size < 192000 /* AVCODEC_MAX_AUDIO_FRAME_SIZE */)
{
mdecoder->decoded_size_max = mdecoder->decoded_size_max * 2 + 16;
mdecoder->decoded_data = xrealloc(mdecoder->decoded_data, mdecoder->decoded_size_max);
@@ -499,7 +489,6 @@
if (!initialized)
{
- avcodec_init();
avcodec_register_all();
initialized = true;
}

View File

@ -1,6 +1,6 @@
Name: freerdp
Version: 1.0.2
Release: 1mamba
Release: 2mamba
Summary: A Remote Desktop Protocol Implementation
Group: Applications/Networking
Vendor: openmamba
@ -9,6 +9,7 @@ Packager: Davide Madrisan <davide.madrisan@gmail.com>
URL: http://www.freerdp.com/
Source0: https://github.com/FreeRDP/FreeRDP/archive/%{version}.tar.gz
Patch0: %{name}-1.0.1-fix_not_linked_with_libpulse.patch
Patch1: freerdp-1.0.2-ffmpeg-2.3.3.patch
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -71,6 +72,7 @@ For instance, sounds, clipboard sync, disk/printer redirection, etc.
%prep
%setup -q -n FreeRDP-%{version}
#%patch0 -p1
%patch1 -p1
%build
%cmake -d build \
@ -140,6 +142,9 @@ For instance, sounds, clipboard sync, disk/printer redirection, etc.
%{_libdir}/freerdp/*.so
%changelog
* Sun Dec 06 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.2-2mamba
- added patch for ffmpeg 2.3.3
* Mon Apr 22 2013 Automatic Build System <autodist@mambasoft.it> 1.0.2-1mamba
- update to 1.0.2