]> git.pld-linux.org Git - packages/xine-lib.git/blame - ffmpeg4.patch
- release 9 (by relup.sh)
[packages/xine-lib.git] / ffmpeg4.patch
CommitLineData
5587f787
JR
1--- xine-lib-1.2.8/src/combined/ffmpeg/ff_audio_decoder.c~ 2017-02-21 12:13:13.000000000 +0100
2+++ xine-lib-1.2.8/src/combined/ffmpeg/ff_audio_decoder.c 2018-04-29 00:29:06.993144238 +0200
3@@ -221,7 +221,7 @@
4 xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
5 _("ffmpeg_audio_dec: increasing buffer to %d to avoid overflow.\n"),
6 this->bufsize);
7- this->buf = xine_realloc_aligned (this->buf, this->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
8+ this->buf = xine_realloc_aligned (this->buf, this->bufsize + AV_INPUT_BUFFER_PADDING_SIZE);
9 }
10 }
11
12@@ -232,9 +232,9 @@
13
14 free (this->context->extradata);
15 this->context->extradata_size = buf->decoder_info[2];
16- this->context->extradata = malloc (buf->decoder_info[2] + FF_INPUT_BUFFER_PADDING_SIZE);
17+ this->context->extradata = malloc (buf->decoder_info[2] + AV_INPUT_BUFFER_PADDING_SIZE);
18 memcpy (this->context->extradata, buf->decoder_info_ptr[2], buf->decoder_info[2]);
19- memset (this->context->extradata + buf->decoder_info[2], 0, FF_INPUT_BUFFER_PADDING_SIZE);
20+ memset (this->context->extradata + buf->decoder_info[2], 0, AV_INPUT_BUFFER_PADDING_SIZE);
21
22 ff_aac_mode_set (this, 0);
23 }
24@@ -451,10 +451,10 @@
25 this->ff_channels, this->ff_bits, this->ff_sample_rate,
26 this->context->block_align);
27 if (!data_len) break;
28- e = malloc (data_len + FF_INPUT_BUFFER_PADDING_SIZE);
29+ e = malloc (data_len + AV_INPUT_BUFFER_PADDING_SIZE);
30 if (!e) break;
31 xine_fast_memcpy (e, p, data_len);
32- memset (e + data_len, 0, FF_INPUT_BUFFER_PADDING_SIZE);
33+ memset (e + data_len, 0, AV_INPUT_BUFFER_PADDING_SIZE);
34 this->context->extradata = e;
35 this->context->extradata_size = data_len;
36 break;
37@@ -1008,7 +1008,7 @@
38 offset = 0;
39
40 /* pad input data */
41- memset(&this->buf[this->size], 0, FF_INPUT_BUFFER_PADDING_SIZE);
42+ memset(&this->buf[this->size], 0, AV_INPUT_BUFFER_PADDING_SIZE);
43
44 while (this->size>=0) {
45
46--- xine-lib-1.2.8/src/combined/ffmpeg/ff_video_decoder.c.orig 2017-02-21 12:13:13.000000000 +0100
47+++ xine-lib-1.2.8/src/combined/ffmpeg/ff_video_decoder.c 2018-04-29 00:35:47.244275385 +0200
48@@ -869,16 +869,12 @@
49 this->stream->video_out->open (this->stream->video_out, this->stream);
50
51 this->edge = 0;
52- if(this->codec->capabilities & CODEC_CAP_DR1 && this->class->enable_dri) {
53+ if(this->codec->capabilities & AV_CODEC_CAP_DR1 && this->class->enable_dri) {
54 if (this->stream->video_out->get_capabilities (this->stream->video_out) & VO_CAP_CROP) {
55 /* We can crop. Fine. Lets allow decoders to paint over the frame edges.
56 This will be slightly faster. And it is also a workaround for buggy
57 v54 who likes to ignore EMU_EDGE for wmv2 and xvid. */
58 this->edge = XFF_EDGE_WIDTH ();
59- } else {
60- /* Some codecs (eg rv10) copy flags in init so it's necessary to set
61- * this flag here in case we are going to use direct rendering */
62- this->context->flags |= CODEC_FLAG_EMU_EDGE;
63 }
64 }
65
66@@ -887,7 +883,7 @@
67 this->context->codec_type = this->codec->type;
68
69 if (this->class->choose_speed_over_accuracy)
70- this->context->flags2 |= CODEC_FLAG2_FAST;
71+ this->context->flags2 |= AV_CODEC_FLAG2_FAST;
72
73 this->context->skip_loop_filter = skip_loop_filter_enum_values[this->class->skip_loop_filter_enum];
74
75@@ -912,7 +908,7 @@
76 /* enable direct rendering by default */
77 this->output_format = XINE_IMGFMT_YV12;
78 #ifdef ENABLE_DIRECT_RENDERING
79- if( this->codec->capabilities & CODEC_CAP_DR1 && this->class->enable_dri ) {
80+ if( this->codec->capabilities & AV_CODEC_CAP_DR1 && this->class->enable_dri ) {
81 #ifdef XFF_AV_BUFFER
82 this->context->get_buffer2 = get_buffer;
83 this->context->thread_safe_callbacks = 1;
84@@ -1456,7 +1452,7 @@
85 xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
86 _("ffmpeg_video_dec: increasing buffer to %d to avoid overflow.\n"),
87 this->bufsize);
88- this->buf = realloc(this->buf, this->bufsize + FF_INPUT_BUFFER_PADDING_SIZE );
89+ this->buf = realloc(this->buf, this->bufsize + AV_INPUT_BUFFER_PADDING_SIZE );
90 }
91 }
92
93@@ -1467,7 +1463,7 @@
94 if (!p[0] && !p[1] && p[2] == 1 && p[3] == 0x0f) {
95 int i;
96
97- this->context->extradata = calloc(1, buf->size + FF_INPUT_BUFFER_PADDING_SIZE);
98+ this->context->extradata = calloc(1, buf->size + AV_INPUT_BUFFER_PADDING_SIZE);
99 this->context->extradata_size = 0;
100
101 for (i = 0; i < buf->size && i < 128; i++) {
102@@ -1596,10 +1592,10 @@
103 if (this->bih.biSize > sizeof(xine_bmiheader)) {
104 this->context->extradata_size = this->bih.biSize - sizeof(xine_bmiheader);
105 this->context->extradata = malloc(this->context->extradata_size +
106- FF_INPUT_BUFFER_PADDING_SIZE);
107+ AV_INPUT_BUFFER_PADDING_SIZE);
108 memcpy(this->context->extradata, this->buf + sizeof(xine_bmiheader),
109 this->context->extradata_size);
110- memset(this->context->extradata + this->context->extradata_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
111+ memset(this->context->extradata + this->context->extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
112 }
113
114 this->context->bits_per_sample = this->bih.biBitCount;
115@@ -1620,7 +1616,7 @@
116 if (this->context->extradata_size < 8) {
117 this->context->extradata_size= 8;
118 this->context->extradata = calloc(1, this->context->extradata_size +
119- FF_INPUT_BUFFER_PADDING_SIZE);
120+ AV_INPUT_BUFFER_PADDING_SIZE);
121 ((uint32_t *)this->context->extradata)[0] = 0;
122 if (codec_type == BUF_VIDEO_RV10)
123 ((uint32_t *)this->context->extradata)[1] = 0x10000000;
124@@ -1628,10 +1624,10 @@
125 ((uint32_t *)this->context->extradata)[1] = 0x10003001;
126 } else {
127 this->context->extradata = malloc(this->context->extradata_size +
128- FF_INPUT_BUFFER_PADDING_SIZE);
129+ AV_INPUT_BUFFER_PADDING_SIZE);
130 memcpy(this->context->extradata, this->buf + 26,
131 this->context->extradata_size);
132- memset(this->context->extradata + this->context->extradata_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
133+ memset(this->context->extradata + this->context->extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
134 }
135
136 xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
137@@ -1663,10 +1659,10 @@
138 lprintf("BUF_SPECIAL_STSD_ATOM\n");
139 this->context->extradata_size = buf->decoder_info[2];
140 this->context->extradata = malloc(buf->decoder_info[2] +
141- FF_INPUT_BUFFER_PADDING_SIZE);
142+ AV_INPUT_BUFFER_PADDING_SIZE);
143 memcpy(this->context->extradata, buf->decoder_info_ptr[2],
144 buf->decoder_info[2]);
145- memset(this->context->extradata + this->context->extradata_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
146+ memset(this->context->extradata + this->context->extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
147
148 } else if (buf->decoder_info[1] == BUF_SPECIAL_DECODER_CONFIG &&
149 !this->context->extradata_size) {
150@@ -1674,10 +1670,10 @@
151 lprintf("BUF_SPECIAL_DECODER_CONFIG\n");
152 this->context->extradata_size = buf->decoder_info[2];
153 this->context->extradata = malloc(buf->decoder_info[2] +
154- FF_INPUT_BUFFER_PADDING_SIZE);
155+ AV_INPUT_BUFFER_PADDING_SIZE);
156 memcpy(this->context->extradata, buf->decoder_info_ptr[2],
157 buf->decoder_info[2]);
158- memset(this->context->extradata + this->context->extradata_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
159+ memset(this->context->extradata + this->context->extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
160 }
161 else if (buf->decoder_info[1] == BUF_SPECIAL_PALETTE) {
162 unsigned int i;
163@@ -2085,7 +2081,7 @@
164 /* data accumulation */
165 if (buf->size > 0) {
166 if ((this->size == 0) &&
167- ((buf->size + FF_INPUT_BUFFER_PADDING_SIZE) < buf->max_size) &&
168+ ((buf->size + AV_INPUT_BUFFER_PADDING_SIZE) < buf->max_size) &&
169 (buf->decoder_flags & BUF_FLAG_FRAME_END)) {
170 /* buf contains a complete frame */
171 /* no memcpy needed */
172@@ -2121,7 +2117,7 @@
173 /* note: bitstream, alt bitstream reader or something will cause
174 * severe mpeg4 artifacts if padding is less than 32 bits.
175 */
176- memset(&chunk_buf[this->size], 0, FF_INPUT_BUFFER_PADDING_SIZE);
177+ memset(&chunk_buf[this->size], 0, AV_INPUT_BUFFER_PADDING_SIZE);
178
179 while (this->size > 0) {
180
181@@ -2732,7 +2728,7 @@
182
183 this->decoder_ok = 0;
184 this->decoder_init_mode = 1;
185- this->buf = calloc(1, VIDEOBUFSIZE + FF_INPUT_BUFFER_PADDING_SIZE);
186+ this->buf = calloc(1, VIDEOBUFSIZE + AV_INPUT_BUFFER_PADDING_SIZE);
187 this->bufsize = VIDEOBUFSIZE;
188
189 this->is_mpeg12 = 0;
190--- xine-lib-1.2.8/src/combined/ffmpeg/ff_mpeg_parser.c~ 2017-02-21 12:13:13.000000000 +0100
191+++ xine-lib-1.2.8/src/combined/ffmpeg/ff_mpeg_parser.c 2018-04-29 00:36:37.109002910 +0200
192@@ -50,7 +50,7 @@
193
194 void mpeg_parser_init (mpeg_parser_t *parser)
195 {
196- parser->chunk_buffer = malloc(BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
197+ parser->chunk_buffer = malloc(BUFFER_SIZE + AV_INPUT_BUFFER_PADDING_SIZE);
198 mpeg_parser_reset(parser);
199 }
200
ddadbed0
JR
201--- xine-lib-1.2.8/src/dxr3/ffmpeg_encoder.c~ 2017-02-21 12:13:13.000000000 +0100
202+++ xine-lib-1.2.8/src/dxr3/ffmpeg_encoder.c 2018-04-29 01:12:12.480759214 +0200
203@@ -207,7 +207,6 @@
204 this->context->height = frame->oheight;
205
206 this->context->gop_size = 0; /*intra frames only */
207- this->context->me_method = ME_ZERO; /*motion estimation type*/
208
209 this->context->time_base.den = 90000;
210 if (frame->vo_frame.duration > 90000 / 24)
This page took 0.048526 seconds and 4 git commands to generate.