1 |
aballier 15/02/08 10:37:53 |
2 |
|
3 |
Added: FusionSound-1.1.1-segfault.patch |
4 |
FusionSound-1.1.1-ffmpeg2.patch |
5 |
Log: |
6 |
Fix build with ffmpeg2. |
7 |
|
8 |
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 160F534A) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 media-libs/FusionSound/files/FusionSound-1.1.1-segfault.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/FusionSound/files/FusionSound-1.1.1-segfault.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/FusionSound/files/FusionSound-1.1.1-segfault.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: FusionSound-1.1.1-segfault.patch |
17 |
=================================================================== |
18 |
Fixes a segfault on probe. |
19 |
|
20 |
Index: FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c |
21 |
=================================================================== |
22 |
--- FusionSound-1.1.1.orig/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c |
23 |
+++ FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c |
24 |
@@ -1138,7 +1138,7 @@ IFusionSoundMusicProvider_FFmpeg_WaitSta |
25 |
static DFBResult |
26 |
Probe( IFusionSoundMusicProvider_ProbeContext *ctx ) |
27 |
{ |
28 |
- AVProbeData pd; |
29 |
+ AVProbeData pd = { 0 }; |
30 |
AVInputFormat *format; |
31 |
|
32 |
av_register_all(); |
33 |
@@ -1165,7 +1165,7 @@ Construct( IFusionSoundMusicProvider *th |
34 |
const char *filename, |
35 |
DirectStream *stream ) |
36 |
{ |
37 |
- AVProbeData pd; |
38 |
+ AVProbeData pd = { 0 }; |
39 |
AVInputFormat *fmt; |
40 |
AVCodec *c; |
41 |
unsigned char buf[64]; |
42 |
|
43 |
|
44 |
|
45 |
1.1 media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: FusionSound-1.1.1-ffmpeg2.patch |
51 |
=================================================================== |
52 |
Minimal change fix to build with ffmpeg2. |
53 |
|
54 |
Index: FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c |
55 |
=================================================================== |
56 |
--- FusionSound-1.1.1.orig/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c |
57 |
+++ FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c |
58 |
@@ -46,6 +46,10 @@ |
59 |
#include <libavformat/avformat.h> |
60 |
#include <libavutil/mathematics.h> |
61 |
|
62 |
+#ifndef MAX_AUDIO_FRAME_SIZE |
63 |
+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio |
64 |
+#endif |
65 |
+ |
66 |
static DFBResult |
67 |
Probe( IFusionSoundMusicProvider_ProbeContext *ctx ); |
68 |
|
69 |
@@ -416,11 +420,11 @@ IFusionSoundMusicProvider_FFmpeg_Destruc |
70 |
/* Ugly hack to fix a bug (segfault) in url_fclose() */ |
71 |
if (!(iformat->flags & AVFMT_NOFILE)) { |
72 |
iformat->flags |= AVFMT_NOFILE; |
73 |
- av_close_input_file( data->ctx ); |
74 |
+ avformat_close_input( &data->ctx ); |
75 |
iformat->flags ^= AVFMT_NOFILE; |
76 |
} |
77 |
else { |
78 |
- av_close_input_file( data->ctx ); |
79 |
+ avformat_close_input( &data->ctx ); |
80 |
} |
81 |
} |