You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg2.p...

32 lines
1.2 KiB

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 );
}
}