]> git.pld-linux.org Git - packages/freerdp.git/blame - freerdp-ffmpeg.patch
- added openssl patch (adjust for openssl 3)
[packages/freerdp.git] / freerdp-ffmpeg.patch
CommitLineData
082279ef
JB
1--- freerdp-1.0.2/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c.orig 2013-01-02 22:46:59.000000000 +0100
2+++ freerdp-1.0.2/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c 2013-09-26 18:29:52.693695785 +0200
3@@ -39,7 +39,7 @@
4 ITSMFDecoder iface;
5
6 int media_type;
7- enum CodecID codec_id;
8+ enum AVCodecID codec_id;
9 AVCodecContext* codec_context;
10 AVCodec* codec;
11 AVFrame* frame;
12@@ -54,7 +54,7 @@
13 {
14 TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
15
16- mdecoder->codec_context = avcodec_alloc_context();
17+ mdecoder->codec_context = avcodec_alloc_context3(NULL);
18 if (!mdecoder->codec_context)
19 {
20 DEBUG_WARN("avcodec_alloc_context failed.");
21@@ -88,16 +88,6 @@
22 mdecoder->codec_context->channels = media_type->Channels;
23 mdecoder->codec_context->block_align = media_type->BlockAlign;
24
25-#ifdef AV_CPU_FLAG_SSE2
26- mdecoder->codec_context->dsp_mask = AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2;
27-#else
28-#if LIBAVCODEC_VERSION_MAJOR < 53
29- mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMXEXT;
30-#else
31- mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMX2;
32-#endif
33-#endif
34-
35 return true;
36 }
37
38@@ -174,7 +164,7 @@
39 {
40 TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
41
42- if (avcodec_open(mdecoder->codec_context, mdecoder->codec) < 0)
43+ if (avcodec_open2(mdecoder->codec_context, mdecoder->codec, NULL) < 0)
44 {
45 DEBUG_WARN("avcodec_open failed.");
46 return false;
47@@ -337,7 +327,7 @@
48 #endif
49
50 if (mdecoder->decoded_size_max == 0)
51- mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE + 16;
52+ mdecoder->decoded_size_max = 192000 /* AVCODEC_MAX_AUDIO_FRAME_SIZE */ + 16;
53 mdecoder->decoded_data = xzalloc(mdecoder->decoded_size_max);
54 /* align the memory for SSE2 needs */
55 dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
56@@ -348,7 +338,7 @@
57 while (src_size > 0)
58 {
59 /* Ensure enough space for decoding */
60- if (mdecoder->decoded_size_max - mdecoder->decoded_size < AVCODEC_MAX_AUDIO_FRAME_SIZE)
61+ if (mdecoder->decoded_size_max - mdecoder->decoded_size < 192000 /* AVCODEC_MAX_AUDIO_FRAME_SIZE */)
62 {
63 mdecoder->decoded_size_max = mdecoder->decoded_size_max * 2 + 16;
64 mdecoder->decoded_data = xrealloc(mdecoder->decoded_data, mdecoder->decoded_size_max);
65@@ -499,7 +489,6 @@
66
67 if (!initialized)
68 {
69- avcodec_init();
70 avcodec_register_all();
71 initialized = true;
72 }
This page took 0.115562 seconds and 4 git commands to generate.