diff options
author | Alexis Ballier <aballier@gentoo.org> | 2012-02-25 23:38:20 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2012-02-25 23:38:20 +0000 |
commit | 4f957ec97c304fb1f6435f42a4b866d0f7301778 (patch) | |
tree | 4ce496af56fee2227e69fedbf7a58e5e6d85e359 /media-libs/FusionSound/files | |
parent | version bump (diff) | |
download | gentoo-2-4f957ec97c304fb1f6435f42a4b866d0f7301778.tar.gz gentoo-2-4f957ec97c304fb1f6435f42a4b866d0f7301778.tar.bz2 gentoo-2-4f957ec97c304fb1f6435f42a4b866d0f7301778.zip |
fix build with ffmpeg-0.10, bug #405721
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/FusionSound/files')
-rw-r--r-- | media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.10.patch | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.10.patch b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.10.patch new file mode 100644 index 000000000000..f6fc333ff796 --- /dev/null +++ b/media-libs/FusionSound/files/FusionSound-1.1.1-ffmpeg-0.10.patch @@ -0,0 +1,126 @@ +Parts of: +http://cvs.pld-linux.org/cgi-bin/viewvc.cgi/cvs/packages/FusionSound/FusionSound-ffmpeg.patch?view=markup + +and remove a write only variable. +https://bugs.gentoo.org/show_bug.cgi?id=405721 + +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 +@@ -41,6 +41,7 @@ + + #include <misc/sound_util.h> + ++#define FF_API_OLD_METADATA2 0 + #include <libavcodec/avcodec.h> + #include <libavformat/avformat.h> + +@@ -476,17 +477,26 @@ static DFBResult + IFusionSoundMusicProvider_FFmpeg_GetTrackDescription( IFusionSoundMusicProvider *thiz, + FSTrackDescription *desc ) + { ++ AVDictionaryEntry *tag = NULL; ++ + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!desc) + return DFB_INVARG; + +- direct_snputs( desc->artist, data->ctx->author, FS_TRACK_DESC_ARTIST_LENGTH ); +- direct_snputs( desc->title, data->ctx->title, FS_TRACK_DESC_TITLE_LENGTH ); +- direct_snputs( desc->album, data->ctx->album, FS_TRACK_DESC_ALBUM_LENGTH ); +- direct_snputs( desc->genre, data->ctx->genre, FS_TRACK_DESC_GENRE_LENGTH ); +- direct_snputs( desc->encoding, data->codec->codec->name, FS_TRACK_DESC_ENCODING_LENGTH ); +- desc->year = data->ctx->year; ++ tag = av_dict_get(data->ctx->metadata, "artist", NULL, 0); ++ if (tag) direct_snputs( desc->artist, tag->value, FS_TRACK_DESC_ARTIST_LENGTH ); ++ tag = av_dict_get(data->ctx->metadata, "title", NULL, 0); ++ if (tag) direct_snputs( desc->title, tag->value, FS_TRACK_DESC_TITLE_LENGTH ); ++ tag = av_dict_get(data->ctx->metadata, "album", NULL, 0); ++ if (tag) direct_snputs( desc->album, tag->value, FS_TRACK_DESC_ALBUM_LENGTH ); ++ tag = av_dict_get(data->ctx->metadata, "genre", NULL, 0); ++ if (tag) direct_snputs( desc->genre, tag->value, FS_TRACK_DESC_GENRE_LENGTH ); ++ tag = av_dict_get(data->ctx->metadata, "encoding", NULL, 0); ++ if (tag) direct_snputs( desc->encoding, tag->value, FS_TRACK_DESC_ENCODING_LENGTH ); ++ tag = av_dict_get(data->ctx->metadata, "year", NULL, 0); ++ if (tag) desc->year = atoi(tag->value); ++ + desc->bitrate = data->codec->bit_rate; + desc->replaygain = desc->replaygain_album = 0; + +@@ -540,7 +550,6 @@ FFmpegStreamThread( DirectThread *thread + IFusionSoundMusicProvider_FFmpeg_data *data = ctx; + + AVPacket pkt; +- u8 *pkt_data = NULL; + int pkt_size = 0; + s64 pkt_pts = AV_NOPTS_VALUE; + +@@ -584,7 +593,6 @@ FFmpegStreamThread( DirectThread *thread + continue; + } + +- pkt_data = pkt.data; + pkt_size = pkt.size; + pkt_pts = pkt.pts; + if (pkt_pts != AV_NOPTS_VALUE) { +@@ -595,14 +603,13 @@ FFmpegStreamThread( DirectThread *thread + } + + len = AVCODEC_MAX_AUDIO_FRAME_SIZE; +- decoded = avcodec_decode_audio2( data->codec, +- (s16*)data->buf, &len, pkt_data, pkt_size ); ++ decoded = avcodec_decode_audio3( data->codec, ++ (s16*)data->buf, &len, &pkt ); + if (decoded < 0) { + av_free_packet( &pkt ); + pkt_size = 0; + } + else { +- pkt_data += decoded; + pkt_size -= decoded; + if (pkt_size <= 0) + av_free_packet( &pkt ); +@@ -739,7 +746,6 @@ FFmpegBufferThread( DirectThread *thread + IFusionSoundMusicProvider_FFmpeg_data *data = ctx; + + AVPacket pkt; +- u8 *pkt_data = NULL; + int pkt_size = 0; + s64 pkt_pts = AV_NOPTS_VALUE; + int pos = 0; +@@ -789,7 +795,6 @@ FFmpegBufferThread( DirectThread *thread + continue; + } + +- pkt_data = pkt.data; + pkt_size = pkt.size; + pkt_pts = pkt.pts; + if (pkt_pts != AV_NOPTS_VALUE) { +@@ -800,14 +805,13 @@ FFmpegBufferThread( DirectThread *thread + } + + len = AVCODEC_MAX_AUDIO_FRAME_SIZE; +- decoded = avcodec_decode_audio2( data->codec, +- (s16*)data->buf, &len, pkt_data, pkt_size ); ++ decoded = avcodec_decode_audio3( data->codec, ++ (s16*)data->buf, &len, &pkt ); + if (decoded < 0) { + av_free_packet( &pkt ); + pkt_size = 0; + } + else { +- pkt_data += decoded; + pkt_size -= decoded; + if (pkt_size <= 0) + av_free_packet( &pkt ); +@@ -1208,7 +1212,7 @@ Construct( IFusionSoundMusicProvider *th + } + + for (i = 0; i < data->ctx->nb_streams; i++) { +- if (data->ctx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) { ++ if (data->ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { + if (!data->st || data->st->codec->bit_rate < data->ctx->streams[i]->codec->bit_rate) + data->st = data->ctx->streams[i]; + } |