Annotation of /trunk/xine-lib/patches/xine-lib-1.2.1-ffmpeg.patch
Parent Directory | Revision Log
Revision 1702 -
(hide annotations)
(download)
Wed Mar 14 11:42:01 2012 UTC (12 years, 6 months ago) by niro
File size: 2314 byte(s)
Wed Mar 14 11:42:01 2012 UTC (12 years, 6 months ago) by niro
File size: 2314 byte(s)
-added patch to fix build against git versions
1 | niro | 1702 | # HG changeset patch |
2 | # User Edgar Hucek <ebsi4711@gmail.com> | ||
3 | # Date 1327873178 -3600 | ||
4 | # Node ID 69983efb1c928e64cc1900579b98142cef0569c4 | ||
5 | # Parent 61f51ebc2659363e308bedb10b9fa4e71a60cedc | ||
6 | fix compile against recent ffmpeg | ||
7 | |||
8 | diff -r 61f51ebc2659 -r 69983efb1c92 src/combined/ffmpeg/ff_video_decoder.c | ||
9 | --- a/src/combined/ffmpeg/ff_video_decoder.c Sat Feb 04 18:52:01 2012 +0000 | ||
10 | +++ b/src/combined/ffmpeg/ff_video_decoder.c Sun Jan 29 22:39:38 2012 +0100 | ||
11 | @@ -130,7 +130,9 @@ | ||
12 | |||
13 | yuv_planes_t yuv; | ||
14 | |||
15 | +#ifdef AVPaletteControl | ||
16 | AVPaletteControl palette_control; | ||
17 | +#endif | ||
18 | |||
19 | #ifdef LOG | ||
20 | enum PixelFormat debug_fmt; | ||
21 | @@ -218,7 +220,9 @@ | ||
22 | /* We should really keep track of the ages of xine frames (see | ||
23 | * avcodec_default_get_buffer in libavcodec/utils.c) | ||
24 | * For the moment tell ffmpeg that every frame is new (age = bignumber) */ | ||
25 | +#ifdef AVFRAMEAGE | ||
26 | av_frame->age = 256*256*256*64; | ||
27 | +#endif | ||
28 | |||
29 | av_frame->type= FF_BUFFER_TYPE_USER; | ||
30 | |||
31 | @@ -1028,7 +1032,9 @@ | ||
32 | memcpy(this->context->extradata, buf->decoder_info_ptr[2], | ||
33 | buf->decoder_info[2]); | ||
34 | |||
35 | - } else if (buf->decoder_info[1] == BUF_SPECIAL_PALETTE) { | ||
36 | + } | ||
37 | +#ifdef AVPaletteControl | ||
38 | + else if (buf->decoder_info[1] == BUF_SPECIAL_PALETTE) { | ||
39 | unsigned int i; | ||
40 | |||
41 | palette_entry_t *demuxer_palette; | ||
42 | @@ -1047,7 +1053,9 @@ | ||
43 | } | ||
44 | decoder_palette->palette_changed = 1; | ||
45 | |||
46 | - } else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) { | ||
47 | + } | ||
48 | +#endif | ||
49 | + else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) { | ||
50 | int i; | ||
51 | |||
52 | lprintf("BUF_SPECIAL_RV_CHUNK_TABLE\n"); | ||
53 | @@ -1794,7 +1802,9 @@ | ||
54 | this->av_frame = avcodec_alloc_frame(); | ||
55 | this->context = avcodec_alloc_context(); | ||
56 | this->context->opaque = this; | ||
57 | +#ifdef AVPaletteControl | ||
58 | this->context->palctrl = NULL; | ||
59 | +#endif | ||
60 | |||
61 | this->decoder_ok = 0; | ||
62 | this->decoder_init_mode = 1; | ||
63 | diff -r 61f51ebc2659 -r 69983efb1c92 src/combined/ffmpeg/ffmpeg_compat.h | ||
64 | --- a/src/combined/ffmpeg/ffmpeg_compat.h Sat Feb 04 18:52:01 2012 +0000 | ||
65 | +++ b/src/combined/ffmpeg/ffmpeg_compat.h Sun Jan 29 22:39:38 2012 +0100 | ||
66 | @@ -91,5 +91,9 @@ | ||
67 | # define AVAUDIO 2 | ||
68 | #endif | ||
69 | |||
70 | +/* AVFrame.age */ | ||
71 | +#if !(LIBAVCODEC_VERSION_MAJOR >= 53 && LIBAVCODEC_VERSION_MAJOR >= 28 && LIBAVCODEC_VERSION_MICRO >= 1) | ||
72 | +# define AVFRAMEAGE 1 | ||
73 | +#endif | ||
74 | |||
75 | #endif /* XINE_AVCODEC_COMPAT_H */ |