summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch')
-rw-r--r--media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch
new file mode 100644
index 000000000000..adde2a541450
--- /dev/null
+++ b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.patch
@@ -0,0 +1,31 @@
+Minimal change fix to build with ffmpeg2.
+
+Index: FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+===================================================================
+--- FusionSound-1.1.1.orig/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
++++ FusionSound-1.1.1/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c
+@@ -46,6 +46,10 @@
+ #include <libavformat/avformat.h>
+ #include <libavutil/mathematics.h>
+
++#ifndef MAX_AUDIO_FRAME_SIZE
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#endif
++
+ static DFBResult
+ Probe( IFusionSoundMusicProvider_ProbeContext *ctx );
+
+@@ -416,11 +420,11 @@ IFusionSoundMusicProvider_FFmpeg_Destruc
+ /* Ugly hack to fix a bug (segfault) in url_fclose() */
+ if (!(iformat->flags & AVFMT_NOFILE)) {
+ iformat->flags |= AVFMT_NOFILE;
+- av_close_input_file( data->ctx );
++ avformat_close_input( &data->ctx );
+ iformat->flags ^= AVFMT_NOFILE;
+ }
+ else {
+- av_close_input_file( data->ctx );
++ avformat_close_input( &data->ctx );
+ }
+ }
+