Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/xine-lib/files: xine-lib-1.2.1-ffmpeg-git.patch
Date: Wed, 29 Feb 2012 01:13:06
Message-Id: 20120229011255.C60A22004C@flycatcher.gentoo.org
1 aballier 12/02/29 01:12:55
2
3 Added: xine-lib-1.2.1-ffmpeg-git.patch
4 Log:
5 add upstream patch to fix build with ffmpeg git
6
7 (Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 media-libs/xine-lib/files/xine-lib-1.2.1-ffmpeg-git.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/xine-lib/files/xine-lib-1.2.1-ffmpeg-git.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/xine-lib/files/xine-lib-1.2.1-ffmpeg-git.patch?rev=1.1&content-type=text/plain
14
15 Index: xine-lib-1.2.1-ffmpeg-git.patch
16 ===================================================================
17 # HG changeset patch
18 # User Edgar Hucek <ebsi4711@×××××.com>
19 # Date 1327873178 -3600
20 # Node ID 69983efb1c928e64cc1900579b98142cef0569c4
21 # Parent 61f51ebc2659363e308bedb10b9fa4e71a60cedc
22 fix compile against recent ffmpeg
23
24 diff -r 61f51ebc2659 -r 69983efb1c92 src/combined/ffmpeg/ff_video_decoder.c
25 --- a/src/combined/ffmpeg/ff_video_decoder.c Sat Feb 04 18:52:01 2012 +0000
26 +++ b/src/combined/ffmpeg/ff_video_decoder.c Sun Jan 29 22:39:38 2012 +0100
27 @@ -130,7 +130,9 @@
28
29 yuv_planes_t yuv;
30
31 +#ifdef AVPaletteControl
32 AVPaletteControl palette_control;
33 +#endif
34
35 #ifdef LOG
36 enum PixelFormat debug_fmt;
37 @@ -218,7 +220,9 @@
38 /* We should really keep track of the ages of xine frames (see
39 * avcodec_default_get_buffer in libavcodec/utils.c)
40 * For the moment tell ffmpeg that every frame is new (age = bignumber) */
41 +#ifdef AVFRAMEAGE
42 av_frame->age = 256*256*256*64;
43 +#endif
44
45 av_frame->type= FF_BUFFER_TYPE_USER;
46
47 @@ -1028,7 +1032,9 @@
48 memcpy(this->context->extradata, buf->decoder_info_ptr[2],
49 buf->decoder_info[2]);
50
51 - } else if (buf->decoder_info[1] == BUF_SPECIAL_PALETTE) {
52 + }
53 +#ifdef AVPaletteControl
54 + else if (buf->decoder_info[1] == BUF_SPECIAL_PALETTE) {
55 unsigned int i;
56
57 palette_entry_t *demuxer_palette;
58 @@ -1047,7 +1053,9 @@
59 }
60 decoder_palette->palette_changed = 1;
61
62 - } else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) {
63 + }
64 +#endif
65 + else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) {
66 int i;
67
68 lprintf("BUF_SPECIAL_RV_CHUNK_TABLE\n");
69 @@ -1794,7 +1802,9 @@
70 this->av_frame = avcodec_alloc_frame();
71 this->context = avcodec_alloc_context();
72 this->context->opaque = this;
73 +#ifdef AVPaletteControl
74 this->context->palctrl = NULL;
75 +#endif
76
77 this->decoder_ok = 0;
78 this->decoder_init_mode = 1;
79 diff -r 61f51ebc2659 -r 69983efb1c92 src/combined/ffmpeg/ffmpeg_compat.h
80 --- a/src/combined/ffmpeg/ffmpeg_compat.h Sat Feb 04 18:52:01 2012 +0000
81 +++ b/src/combined/ffmpeg/ffmpeg_compat.h Sun Jan 29 22:39:38 2012 +0100
82 @@ -91,5 +91,9 @@
83 # define AVAUDIO 2
84 #endif
85
86 +/* AVFrame.age */
87 +#if !(LIBAVCODEC_VERSION_MAJOR >= 53 && LIBAVCODEC_VERSION_MAJOR >= 28 && LIBAVCODEC_VERSION_MICRO >= 1)
88 +# define AVFRAMEAGE 1
89 +#endif
90
91 #endif /* XINE_AVCODEC_COMPAT_H */