1 From 8e96a113e3505741e323d0b707db86c31bf353c4 Mon Sep 17 00:00:00 2001
2 From: KennyTM~ <kennytm@gmail.com>
3 Date: Fri, 9 Dec 2011 04:42:29 +0800
4 Subject: [PATCH] [PATCH] Patches for compilation on Arch Linux.
7 .../idirectfbvideoprovider_ffmpeg.c | 19 ++++++++++---------
8 1 files changed, 10 insertions(+), 9 deletions(-)
10 diff --git a/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_ffmpeg.c b/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_ffmpeg.c
11 index 1bae83f..96613d6 100644
12 --- a/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_ffmpeg.c
13 +++ b/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_ffmpeg.c
15 # include <fusionsound_limits.h>
18 +#define FF_API_OLD_METADATA2 0
19 #include <libavcodec/avcodec.h>
20 #include <libavformat/avformat.h>
22 @@ -116,7 +117,7 @@ typedef struct {
28 AVFormatContext *context;
31 @@ -641,9 +642,9 @@ FFmpegVideo( DirectThread *self, void *arg )
35 - avcodec_decode_video( data->video.ctx,
36 + avcodec_decode_video2( data->video.ctx,
37 data->video.src_frame,
38 - &done, pkt.data, pkt.size );
42 FFmpegPutFrame( data );
43 @@ -748,9 +749,9 @@ FFmpegAudio( DirectThread *self, void *arg )
46 for (pkt_data = pkt.data, pkt_size = pkt.size; pkt_size > 0;) {
47 - decoded = avcodec_decode_audio2( data->audio.ctx,
48 + decoded = avcodec_decode_audio3( data->audio.ctx,
49 (s16*)&buf[size], &len,
50 - pkt_data, pkt_size );
55 @@ -1011,14 +1012,14 @@ IDirectFBVideoProvider_FFmpeg_GetStreamDescription( IDirectFBVideoProvider *thiz
56 desc->audio.channels = data->audio.ctx->channels;
57 desc->audio.bitrate = data->audio.ctx->bit_rate;
61 direct_snputs( desc->title, data->context->title, DFB_STREAM_DESC_TITLE_LENGTH );
62 direct_snputs( desc->author, data->context->author, DFB_STREAM_DESC_AUTHOR_LENGTH );
63 direct_snputs( desc->album, data->context->album, DFB_STREAM_DESC_ALBUM_LENGTH );
64 direct_snputs( desc->genre, data->context->genre, DFB_STREAM_DESC_GENRE_LENGTH );
65 direct_snputs( desc->comment, data->context->comment, DFB_STREAM_DESC_COMMENT_LENGTH );
66 desc->year = data->context->year;
72 @@ -1643,13 +1644,13 @@ Construct( IDirectFBVideoProvider *thiz,
74 for (i = 0; i < data->context->nb_streams; i++) {
75 switch (data->context->streams[i]->codec->codec_type) {
76 - case CODEC_TYPE_VIDEO:
77 + case AVMEDIA_TYPE_VIDEO:
78 if (!data->video.st ||
79 data->video.st->codec->bit_rate <
80 data->context->streams[i]->codec->bit_rate)
81 data->video.st = data->context->streams[i];
83 - case CODEC_TYPE_AUDIO:
84 + case AVMEDIA_TYPE_AUDIO:
85 if (!data->audio.st ||
86 data->audio.st->codec->bit_rate <
87 data->context->streams[i]->codec->bit_rate)