projects/aports·blob master · refs

620 lines · 23.4 KiB

1From 08022744da3e8e5df7c380e033397b8f74346a5e Mon Sep 17 00:00:00 2001
2From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
3Date: Sat, 21 Sep 2024 09:30:09 +0000
4Subject: [PATCH] libmpdemux/demux_lavf: explicit pointer casts
5
6Recent compilers consider implicit casts an error.
7
8git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38650 b3059339-0415-0410-9bf9-f77b7e298cf2
9---
10 libmpdemux/demux_lavf.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
14index 06a9e15cc..60b15f0f6 100644
15--- a/libmpdemux/demux_lavf.c
16+++ b/libmpdemux/demux_lavf.c
17@@ -378,7 +378,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
18 }
19 case AVMEDIA_TYPE_VIDEO:{
20 AVDictionaryEntry *rot = av_dict_get(st->metadata, "rotate", NULL, 0);
21- const int32_t *disp_matrix = av_stream_get_side_data(st, AV_PKT_DATA_DISPLAYMATRIX, NULL);
22+ const int32_t *disp_matrix = (const int32_t *)av_stream_get_side_data(st, AV_PKT_DATA_DISPLAYMATRIX, NULL);
23 sh_video_t* sh_video;
24 BITMAPINFOHEADER *bih;
25 sh_video=new_sh_video_vid(demuxer, i, priv->video_streams);
26--
272.25.1
28
29From 151b9e0bc961a18036f91af046a4e2e1fbfcf09c Mon Sep 17 00:00:00 2001
30From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
31Date: Sat, 21 Sep 2024 09:30:07 +0000
32Subject: [PATCH] libmpcodecs/vf_screenshot: explicit pointer casts
33
34Recent compilers consider implicit casts an error.
35
36git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38648 b3059339-0415-0410-9bf9-f77b7e298cf2
37---
38 libmpcodecs/vf_screenshot.c | 4 ++--
39 1 file changed, 2 insertions(+), 2 deletions(-)
40
41diff --git a/libmpcodecs/vf_screenshot.c b/libmpcodecs/vf_screenshot.c
42index e8b87fa91..4aa5ee274 100644
43--- a/libmpcodecs/vf_screenshot.c
44+++ b/libmpcodecs/vf_screenshot.c
45@@ -60,7 +60,7 @@ static void draw_slice(struct vf_instance *vf, unsigned char** src,
46 int* stride, int w,int h, int x, int y)
47 {
48 if (vf->priv->store_slices) {
49- sws_scale(vf->priv->ctx, src, stride, y, h, vf->priv->pic->data, vf->priv->pic->linesize);
50+ sws_scale(vf->priv->ctx, (const uint8_t *const *)src, stride, y, h, vf->priv->pic->data, vf->priv->pic->linesize);
51 }
52 vf_next_draw_slice(vf,src,stride,w,h,x,y);
53 }
54@@ -158,7 +158,7 @@ static void scale_image(struct vf_priv_s* priv, mp_image_t *mpi)
55 if (!priv->pic->data[0])
56 priv->pic->data[0] = av_malloc(priv->pic->linesize[0]*priv->dh);
57
58- sws_scale(priv->ctx, mpi->planes, mpi->stride, 0, mpi->height, priv->pic->data, priv->pic->linesize);
59+ sws_scale(priv->ctx, (const uint8_t *const *)mpi->planes, mpi->stride, 0, mpi->height, priv->pic->data, priv->pic->linesize);
60 }
61
62 static void start_slice(struct vf_instance *vf, mp_image_t *mpi)
63--
642.25.1
65
66From 314fbd1cf96ee9fc317eb6c2054db5f76c94e930 Mon Sep 17 00:00:00 2001
67From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
68Date: Sat, 21 Sep 2024 09:30:17 +0000
69Subject: [PATCH] sub/spudec: explicit pointer casts
70
71Recent compilers consider implicit casts an error.
72
73git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38659 b3059339-0415-0410-9bf9-f77b7e298cf2
74---
75 sub/spudec.c | 4 ++--
76 1 file changed, 2 insertions(+), 2 deletions(-)
77
78diff --git a/sub/spudec.c b/sub/spudec.c
79index eefc235d4..516ce52e6 100644
80--- a/sub/spudec.c
81+++ b/sub/spudec.c
82@@ -897,9 +897,9 @@ static void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh,
83 }
84
85 ctx=sws_getContext(sw, sh, AV_PIX_FMT_GRAY8, dw, dh, AV_PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL);
86- sws_scale(ctx,&s1,&ss,0,sh,&d1,&ds);
87+ sws_scale(ctx,(const uint8_t *const *)&s1,&ss,0,sh,&d1,&ds);
88 for (i=ss*sh-1; i>=0; i--) s2[i] = -s2[i];
89- sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds);
90+ sws_scale(ctx,(const uint8_t *const *)&s2,&ss,0,sh,&d2,&ds);
91 for (i=ds*dh-1; i>=0; i--) d2[i] = -d2[i];
92 sws_freeContext(ctx);
93 }
94--
952.25.1
96
97From 36604b124a5f1e75929b1bfb097c87010182fe3e Mon Sep 17 00:00:00 2001
98From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
99Date: Sat, 21 Sep 2024 09:30:13 +0000
100Subject: [PATCH] loader/qtx/qtxsdk/components: explicit pointer casts
101
102Recent compilers consider implicit casts an error.
103
104git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38655 b3059339-0415-0410-9bf9-f77b7e298cf2
105---
106 loader/qtx/qtxsdk/components.h | 2 +-
107 1 file changed, 1 insertion(+), 1 deletion(-)
108
109diff --git a/loader/qtx/qtxsdk/components.h b/loader/qtx/qtxsdk/components.h
110index 5ad7572d8..d3109effa 100644
111--- a/loader/qtx/qtxsdk/components.h
112+++ b/loader/qtx/qtxsdk/components.h
113@@ -780,7 +780,7 @@ static inline void dump_CodecDecompressParams(void* xxx){
114 printf("dstrect: %d;%d - %d;%d\n",cd->dstRect.top,cd->dstRect.left,cd->dstRect.bottom,cd->dstRect.right);
115 printf("wantedDestinationPixelTypes=%p\n",cd->wantedDestinationPixelTypes);
116 if(cd->wantedDestinationPixelTypes){
117- unsigned int* p=cd->wantedDestinationPixelTypes;
118+ unsigned int* p=(unsigned *)cd->wantedDestinationPixelTypes;
119 while(p[0]){
120 printf(" 0x%08X %p\n",p[0],&p[0]);
121 ++p;
122--
1232.25.1
124
125From 390f2c186b209ee9017968a40788e39fb56aab11 Mon Sep 17 00:00:00 2001
126From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
127Date: Sat, 21 Sep 2024 09:30:16 +0000
128Subject: [PATCH] sub/sub: explicit pointer casts
129
130Recent compilers consider implicit casts an error.
131
132git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38658 b3059339-0415-0410-9bf9-f77b7e298cf2
133---
134 sub/sub.c | 2 +-
135 1 file changed, 1 insertion(+), 1 deletion(-)
136
137diff --git a/sub/sub.c b/sub/sub.c
138index 142242179..7bad030d5 100644
139--- a/sub/sub.c
140+++ b/sub/sub.c
141@@ -727,7 +727,7 @@ static inline void vo_update_text_sub(mp_osd_obj_t *obj, int dxs, int dys)
142 // reading the subtitle words from vo_sub->text[]
143 while (*t) {
144 if (sub_utf8)
145- c = utf8_get_char(&t);
146+ c = utf8_get_char((const char **)&t);
147 else if ((c = *t++) >= 0x80 && sub_unicode)
148 c = (c<<8) + *t++;
149 if (k==MAX_UCS){
150--
1512.25.1
152
153From 4128ed0ed69236c0dda18abbe590682c40653f0d Mon Sep 17 00:00:00 2001
154From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
155Date: Sat, 21 Sep 2024 09:30:09 +0000
156Subject: [PATCH] libmpdemux/muxer_avi: explicit pointer casts
157
158Recent compilers consider implicit casts an error.
159
160git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38651 b3059339-0415-0410-9bf9-f77b7e298cf2
161---
162 libmpdemux/muxer_avi.c | 26 +++++++++++++-------------
163 1 file changed, 13 insertions(+), 13 deletions(-)
164
165diff --git a/libmpdemux/muxer_avi.c b/libmpdemux/muxer_avi.c
166index 78a666770..912e6cde2 100644
167--- a/libmpdemux/muxer_avi.c
168+++ b/libmpdemux/muxer_avi.c
169@@ -142,8 +142,8 @@ static muxer_stream_t* avifile_new_stream(muxer_t *muxer,int type){
170 static void write_avi_chunk(stream_t *stream,unsigned int id,int len,void* data){
171 int le_len = le2me_32(len);
172 int le_id = le2me_32(id);
173- stream_write_buffer(stream, &le_id, 4);
174- stream_write_buffer(stream, &le_len, 4);
175+ stream_write_buffer(stream, (unsigned char *)&le_id, 4);
176+ stream_write_buffer(stream, (unsigned char *)&le_len, 4);
177
178 if(len>0){
179 if(data){
180@@ -176,9 +176,9 @@ static void write_avi_list(stream_t *stream, unsigned int id, int len)
181 list_id = le2me_32(list_id);
182 le_len = le2me_32(len);
183 le_id = le2me_32(id);
184- stream_write_buffer(stream, &list_id, 4);
185- stream_write_buffer(stream, &le_len, 4);
186- stream_write_buffer(stream, &le_id, 4);
187+ stream_write_buffer(stream, (unsigned char *)&list_id, 4);
188+ stream_write_buffer(stream, (unsigned char *)&le_len, 4);
189+ stream_write_buffer(stream, (unsigned char *)&le_id, 4);
190 }
191
192 static void avifile_odml_new_riff(muxer_t *muxer)
193@@ -199,7 +199,7 @@ static void avifile_odml_new_riff(muxer_t *muxer)
194 riff[0]=le2me_32(mmioFOURCC('R','I','F','F'));
195 riff[1]=0;
196 riff[2]=le2me_32(mmioFOURCC('A','V','I','X'));
197- stream_write_buffer(muxer->stream, riff, 12);
198+ stream_write_buffer(muxer->stream, (unsigned char *)riff, 12);
199
200 write_avi_list(muxer->stream,listtypeAVIMOVIE,0);
201
202@@ -251,12 +251,12 @@ static void avifile_write_header(muxer_t *muxer){
203 movilen = le2me_32(rifflen - 12);
204 rifflen = le2me_32(rifflen);
205 stream_seek(muxer->stream, vsi->riffofs[i]+4);
206- stream_write_buffer(muxer->stream,&rifflen,4);
207+ stream_write_buffer(muxer->stream,(unsigned char *)&rifflen,4);
208
209 /* fixup movi length */
210 if (i > 0) {
211 stream_seek(muxer->stream, vsi->riffofs[i]+16);
212- stream_write_buffer(muxer->stream,&movilen,4);
213+ stream_write_buffer(muxer->stream,(unsigned char *)&movilen,4);
214 }
215 }
216
217@@ -269,7 +269,7 @@ static void avifile_write_header(muxer_t *muxer){
218 riff[0]=le2me_32(riff[0]);
219 riff[1]=le2me_32(riff[1]);
220 riff[2]=le2me_32(riff[2]);
221- stream_write_buffer(muxer->stream,&riff,12);
222+ stream_write_buffer(muxer->stream,(unsigned char *)&riff,12);
223 }
224
225 // update AVI header:
226@@ -406,7 +406,7 @@ static void avifile_write_header(muxer_t *muxer){
227 idxhdr[6] = 0;
228 idxhdr[7] = 0;
229
230- stream_write_buffer(muxer->stream,idxhdr,sizeof(idxhdr));
231+ stream_write_buffer(muxer->stream,(unsigned char *)idxhdr,sizeof(idxhdr));
232 for (j=0; j<n; j++) {
233 struct avi_odmlsuperidx_entry *entry = &si->superidx[j];
234 unsigned int data[4];
235@@ -414,7 +414,7 @@ static void avifile_write_header(muxer_t *muxer){
236 data[1] = le2me_32(entry->ofs >> 32);
237 data[2] = le2me_32(entry->len);
238 data[3] = le2me_32(entry->duration);
239- stream_write_buffer(muxer->stream,data,sizeof(data));
240+ stream_write_buffer(muxer->stream,(unsigned char *)data,sizeof(data));
241 }
242 }
243 }
244@@ -642,13 +642,13 @@ static void avifile_odml_write_index(muxer_t *muxer){
245 si->superidx[j].ofs = stream_tell(muxer->stream);
246 si->superidx[j].duration = duration;
247
248- stream_write_buffer(muxer->stream, idxhdr,sizeof(idxhdr));
249+ stream_write_buffer(muxer->stream, (unsigned char *)idxhdr,sizeof(idxhdr));
250 for (k=0; k<entries_per_subidx && idxpos<si->idxpos; k++) {
251 unsigned int entry[2];
252 entry[0] = le2me_32(si->idx[idxpos].ofs - start);
253 entry[1] = le2me_32(si->idx[idxpos].len | si->idx[idxpos].flags);
254 idxpos++;
255- stream_write_buffer(muxer->stream, entry, sizeof(entry));
256+ stream_write_buffer(muxer->stream, (unsigned char *)entry, sizeof(entry));
257 }
258 }
259 }
260--
2612.25.1
262
263From 4d3182896b00c11a3c16bcc4fc4870967f08d391 Mon Sep 17 00:00:00 2001
264From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
265Date: Sat, 21 Sep 2024 09:30:08 +0000
266Subject: [PATCH] libmpdemux/demux_film: explicit pointer casts
267
268Recent compilers consider implicit casts an error.
269
270git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38649 b3059339-0415-0410-9bf9-f77b7e298cf2
271---
272 libmpdemux/demux_film.c | 2 +-
273 1 file changed, 1 insertion(+), 1 deletion(-)
274
275diff --git a/libmpdemux/demux_film.c b/libmpdemux/demux_film.c
276index fdb391ddd..b351368e4 100644
277--- a/libmpdemux/demux_film.c
278+++ b/libmpdemux/demux_film.c
279@@ -157,7 +157,7 @@ static int demux_film_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds)
280 free(buf);
281 }
282 else {/* for 16bit */
283- unsigned short* tmp = dp->buffer;
284+ unsigned short* tmp = (unsigned short *)dp->buffer;
285 unsigned short* buf = malloc(film_chunk.chunk_size);
286 for(i = 0; i < film_chunk.chunk_size/4; i++) {
287 buf[i*2] = tmp[i];
288--
2892.25.1
290
291From 583aefee6d254244ec4f9c35fc7659555498caa0 Mon Sep 17 00:00:00 2001
292From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
293Date: Sat, 21 Sep 2024 09:30:05 +0000
294Subject: [PATCH] libmpcodecs/vf_pp: explicit pointer casts
295
296Recent compilers consider implicit casts an error.
297
298git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38646 b3059339-0415-0410-9bf9-f77b7e298cf2
299---
300 libmpcodecs/vf_pp.c | 2 +-
301 1 file changed, 1 insertion(+), 1 deletion(-)
302
303diff --git a/libmpcodecs/vf_pp.c b/libmpcodecs/vf_pp.c
304index 9721554d0..935677be6 100644
305--- a/libmpcodecs/vf_pp.c
306+++ b/libmpcodecs/vf_pp.c
307@@ -142,7 +142,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts, double
308
309 if(vf->priv->pp || !(mpi->flags&MP_IMGFLAG_DIRECT)){
310 // do the postprocessing! (or copy if no DR)
311- pp_postprocess(mpi->planes ,mpi->stride,
312+ pp_postprocess((const uint8_t **)mpi->planes ,mpi->stride,
313 vf->dmpi->planes,vf->dmpi->stride,
314 (mpi->w+7)&(~7),mpi->h,
315 mpi->qscale, mpi->qstride,
316--
3172.25.1
318
319From 62f75720e743badb1407e4efa3c831900e475a9a Mon Sep 17 00:00:00 2001
320From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
321Date: Sat, 21 Sep 2024 09:30:10 +0000
322Subject: [PATCH] libvo/vo_aa: explicit pointer casts
323
324Recent compilers consider implicit casts an error.
325
326git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38652 b3059339-0415-0410-9bf9-f77b7e298cf2
327---
328 libvo/vo_aa.c | 4 ++--
329 1 file changed, 2 insertions(+), 2 deletions(-)
330
331diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
332index dc805be5b..599a938ab 100644
333--- a/libvo/vo_aa.c
334+++ b/libvo/vo_aa.c
335@@ -357,7 +357,7 @@ draw_frame(uint8_t *src[]) {
336 break;
337 }
338
339- sws_scale(sws,src,stride,0,src_height,image,image_stride);
340+ sws_scale(sws,(const uint8_t *const *)src,stride,0,src_height,image,image_stride);
341
342 /* Now 'ASCIInate' the image */
343 if (fast)
344@@ -377,7 +377,7 @@ draw_slice(uint8_t *src[], int stride[],
345 int dx2 = screen_x + ((x+w) * screen_w / src_width);
346 int dy2 = screen_y + ((y+h) * screen_h / src_height);
347
348- sws_scale(sws,src,stride,y,h,image,image_stride);
349+ sws_scale(sws,(const uint8_t *const *)src,stride,y,h,image,image_stride);
350
351 /* Now 'ASCIInate' the image */
352 if (fast)
353--
3542.25.1
355
356From 6863cf457bb0f0b98dde19dd85c666191130c7d6 Mon Sep 17 00:00:00 2001
357From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
358Date: Sat, 21 Sep 2024 09:30:14 +0000
359Subject: [PATCH] mp_msg: explicit pointer casts
360
361Recent compilers consider implicit casts an error.
362
363git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38656 b3059339-0415-0410-9bf9-f77b7e298cf2
364---
365 mp_msg.c | 2 +-
366 1 file changed, 1 insertion(+), 1 deletion(-)
367
368diff --git a/mp_msg.c b/mp_msg.c
369index 67bcc067d..3b059801a 100644
370--- a/mp_msg.c
371+++ b/mp_msg.c
372@@ -70,7 +70,7 @@ const char* filename_recode(const char* filename)
373 filename_len = strlen(filename);
374 max_path = MSGSIZE_MAX - 4;
375 precoded = recoded_filename;
376- if (iconv(inv_msgiconv, &filename, &filename_len,
377+ if (iconv(inv_msgiconv, (char **)&filename, &filename_len,
378 &precoded, &max_path) == (size_t)(-1) && errno == E2BIG) {
379 precoded[0] = precoded[1] = precoded[2] = '.';
380 precoded += 3;
381--
3822.25.1
383
384From 8dea6f4931b7677a93ad6394b8ad021207dd0442 Mon Sep 17 00:00:00 2001
385From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
386Date: Sat, 21 Sep 2024 09:30:11 +0000
387Subject: [PATCH] libvo/vo_matrixview: explicit pointer casts
388
389Recent compilers consider implicit casts an error.
390
391git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38653 b3059339-0415-0410-9bf9-f77b7e298cf2
392---
393 libvo/vo_matrixview.c | 2 +-
394 1 file changed, 1 insertion(+), 1 deletion(-)
395
396diff --git a/libvo/vo_matrixview.c b/libvo/vo_matrixview.c
397index ee2735b1c..632ec4e59 100644
398--- a/libvo/vo_matrixview.c
399+++ b/libvo/vo_matrixview.c
400@@ -170,7 +170,7 @@ static void flip_page(void)
401
402 static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
403 {
404- sws_scale(sws, src, stride, y, h, map_image, map_stride);
405+ sws_scale(sws, (const uint8_t *const *)src, stride, y, h, map_image, map_stride);
406 return 0;
407 }
408
409--
4102.25.1
411
412From b4f1865ca5053d8b3d7f131c27e515e69374afcb Mon Sep 17 00:00:00 2001
413From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
414Date: Sat, 21 Sep 2024 09:30:04 +0000
415Subject: [PATCH] libmpcodecs/vd_ffmpeg: explicit pointer casts
416
417Recent compilers consider implicit casts an error.
418
419git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38645 b3059339-0415-0410-9bf9-f77b7e298cf2
420---
421 libmpcodecs/vd_ffmpeg.c | 2 +-
422 1 file changed, 1 insertion(+), 1 deletion(-)
423
424diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
425index b112a2669..2d2fc7281 100644
426--- a/libmpcodecs/vd_ffmpeg.c
427+++ b/libmpcodecs/vd_ffmpeg.c
428@@ -728,7 +728,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference){
429 if (ctx->use_vdpau) {
430 VdpVideoSurface surface = (VdpVideoSurface)mpi->priv;
431 avctx->draw_horiz_band= NULL;
432- mpi->planes[3] = surface;
433+ mpi->planes[3] = (char *)surface;
434 }
435 #endif
436
437--
4382.25.1
439
440From bb6d913176c79d073be117e32e0dfcd2f6c4bf35 Mon Sep 17 00:00:00 2001
441From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
442Date: Sat, 21 Sep 2024 09:30:12 +0000
443Subject: [PATCH] libvo/vo_x11: explicit pointer casts
444
445Recent compilers consider implicit casts an error.
446
447git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38654 b3059339-0415-0410-9bf9-f77b7e298cf2
448---
449 libvo/vo_x11.c | 2 +-
450 1 file changed, 1 insertion(+), 1 deletion(-)
451
452diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
453index c3ec528a4..f39076810 100644
454--- a/libvo/vo_x11.c
455+++ b/libvo/vo_x11.c
456@@ -492,7 +492,7 @@ static int draw_slice(uint8_t * src[], int stride[], int w, int h,
457 dst[0] += dstStride[0] * (image_height - 1);
458 dstStride[0] = -dstStride[0];
459 }
460- sws_scale(swsContext, src, stride, y, h, dst, dstStride);
461+ sws_scale(swsContext, (const uint8_t *const *)src, stride, y, h, dst, dstStride);
462 return 0;
463 }
464
465--
4662.25.1
467
468From df9a6b2d6235c064eca0f24d0c45c89d0524bd7a Mon Sep 17 00:00:00 2001
469From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
470Date: Sat, 21 Sep 2024 09:30:15 +0000
471Subject: [PATCH] mplayer: explicit pointer casts
472
473Recent compilers consider implicit casts an error.
474
475git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38657 b3059339-0415-0410-9bf9-f77b7e298cf2
476---
477 mplayer.c | 2 +-
478 1 file changed, 1 insertion(+), 1 deletion(-)
479
480diff --git a/mplayer.c b/mplayer.c
481index 952971c09..a63d4735e 100644
482--- a/mplayer.c
483+++ b/mplayer.c
484@@ -3538,7 +3538,7 @@ goto_enable_cache:
485 break;
486 if ((mpctx->demuxer->file_format == DEMUXER_TYPE_AVI || mpctx->demuxer->file_format == DEMUXER_TYPE_ASF || mpctx->demuxer->file_format == DEMUXER_TYPE_MOV)
487 && stream_dump_type == 2)
488- stream_write_buffer(os, &in_size, 4);
489+ stream_write_buffer(os, (unsigned char *)&in_size, 4);
490 if (in_size > 0) {
491 stream_write_buffer(os, start, in_size);
492 stream_dump_progress(in_size, mpctx->stream);
493--
4942.25.1
495
496From f64fcbefa296b2e226b42db4f88af21b5f03fe02 Mon Sep 17 00:00:00 2001
497From: cigaes <cigaes@b3059339-0415-0410-9bf9-f77b7e298cf2>
498Date: Sat, 21 Sep 2024 09:30:06 +0000
499Subject: [PATCH] libmpcodecs/vf_scale: explicit pointer casts
500
501Recent compilers consider implicit casts an error.
502
503git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38647 b3059339-0415-0410-9bf9-f77b7e298cf2
504---
505 libmpcodecs/vf_scale.c | 6 +++---
506 1 file changed, 3 insertions(+), 3 deletions(-)
507
508diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c
509index e48a2ad45..39deb59c2 100644
510--- a/libmpcodecs/vf_scale.c
511+++ b/libmpcodecs/vf_scale.c
512@@ -439,14 +439,14 @@ static void scale(struct SwsContext *sws1, struct SwsContext *sws2, uint8_t *src
513 int src_stride2[MP_MAX_PLANES]={2*src_stride[0], 2*src_stride[1], 2*src_stride[2], 2*src_stride[3]};
514 int dst_stride2[MP_MAX_PLANES]={2*dst_stride[0], 2*dst_stride[1], 2*dst_stride[2], 2*dst_stride[3]};
515
516- sws_scale(sws1, src2, src_stride2, y>>1, h>>1, dst2, dst_stride2);
517+ sws_scale(sws1, (const uint8_t *const *)src2, src_stride2, y>>1, h>>1, dst2, dst_stride2);
518 for(i=0; i<MP_MAX_PLANES; i++){
519 src2[i] += src_stride[i];
520 dst2[i] += dst_stride[i];
521 }
522- sws_scale(sws2, src2, src_stride2, y>>1, h>>1, dst2, dst_stride2);
523+ sws_scale(sws2, (const uint8_t *const *)src2, src_stride2, y>>1, h>>1, dst2, dst_stride2);
524 }else{
525- sws_scale(sws1, src2, src_stride, y, h, dst, dst_stride);
526+ sws_scale(sws1, (const uint8_t *const *)src2, src_stride, y, h, dst, dst_stride);
527 }
528 }
529
530--
5312.25.1
532
533Patch-Source: https://git.mplayerhq.hu/gitweb/mplayer.git/commit/236a20eae0497c69185b2b832e2a302af4851109
534Diff between source and af_lavcresample.c at the commit.
535--
536--- a/libaf/af_lavcresample.c
537+++ b/libaf/af_lavcresample.c
538@@ -45,6 +45,7 @@
539 int phase_shift;
540 double cutoff;
541
542+ int ctx_format;
543 int ctx_out_rate;
544 int ctx_in_rate;
545 int ctx_filter_size;
546@@ -57,6 +58,9 @@
547 // Initialization and runtime control
548 static int control(struct af_instance_s* af, int cmd, void* arg)
549 {
550+ AVChannelLayout ch_layout;
551+ enum AVSampleFormat av_format;
552+
553 af_resample_t* s = (af_resample_t*)af->setup;
554 af_data_t *data= (af_data_t*)arg;
555 int out_rate, test_output_res; // helpers for checking input format
556@@ -68,12 +72,23 @@
557
558 af->data->nch = data->nch;
559 if (af->data->nch > AF_NCH) af->data->nch = AF_NCH;
560- af->data->format = AF_FORMAT_S16_NE;
561- af->data->bps = 2;
562+ if(data->format == AF_FORMAT_FLOAT_NE){
563+ af->data->format = AF_FORMAT_FLOAT_NE;
564+ av_format = AV_SAMPLE_FMT_FLT;
565+ }else
566+ {
567+ af->data->format = AF_FORMAT_S16_NE;
568+ av_format = AV_SAMPLE_FMT_S16;
569+ }
570+
571+ af->data->bps = af_fmt2bits(af->data->format)/8;
572 af->mul = (double)af->data->rate / data->rate;
573 af->delay = af->data->nch * s->filter_length / FFMIN(af->mul, 1); // *bps*.5
574
575- if (s->ctx_out_rate != af->data->rate || s->ctx_in_rate != data->rate || s->ctx_filter_size != s->filter_length ||
576+ av_channel_layout_default(&ch_layout, af->data->nch);
577+
578+ if (s->ctx_format != af->data->format ||
579+ s->ctx_out_rate != af->data->rate || s->ctx_in_rate != data->rate || s->ctx_filter_size != s->filter_length ||
580 s->ctx_phase_shift != s->phase_shift || s->ctx_linear != s->linear || s->ctx_cutoff != s->cutoff) {
581 swr_free(&s->swrctx);
582 if((s->swrctx=swr_alloc()) == NULL) return AF_ERROR;
583@@ -83,11 +98,13 @@
584 av_opt_set_int(s->swrctx, "phase_shift", s->phase_shift, 0);
585 av_opt_set_int(s->swrctx, "linear_interp", s->linear, 0);
586 av_opt_set_double(s->swrctx, "cutoff", s->cutoff, 0);
587- av_opt_set_sample_fmt(s->swrctx, "in_sample_fmt", AV_SAMPLE_FMT_S16, 0);
588- av_opt_set_sample_fmt(s->swrctx, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);
589- av_opt_set_int(s->swrctx, "in_channel_count", af->data->nch, 0);
590- av_opt_set_int(s->swrctx, "out_channel_count", af->data->nch, 0);
591+ if(av_opt_set_sample_fmt(s->swrctx, "in_sample_fmt", av_format, 0) < 0) return AF_ERROR;
592+ if(av_opt_set_sample_fmt(s->swrctx, "out_sample_fmt", av_format, 0) < 0) return AF_ERROR;
593+ if(av_opt_set_chlayout(s->swrctx, "in_chlayout", &ch_layout, 0) < 0) return AF_ERROR;
594+ if(av_opt_set_chlayout(s->swrctx, "out_chlayout", &ch_layout, 0) < 0) return AF_ERROR;
595+
596 if(swr_init(s->swrctx) < 0) return AF_ERROR;
597+ s->ctx_format = af->data->format;
598 s->ctx_out_rate = af->data->rate;
599 s->ctx_in_rate = data->rate;
600 s->ctx_filter_size = s->filter_length;
601@@ -139,6 +156,7 @@
602 int8_t *out;
603 int chans = data->nch;
604 int in_len = data->len;
605+ int bps = data->bps;
606 int out_len = in_len * af->mul + 10;
607
608 if(AF_OK != RESIZE_LOCAL_BUFFER(af,data))
609@@ -156,9 +174,9 @@
610
611 memcpy(s->in[0], in, in_len);
612
613- ret = swr_convert(s->swrctx, &s->tmp[0], out_len/chans/2, &s->in[0], in_len/chans/2);
614+ ret = swr_convert(s->swrctx, &s->tmp[0], out_len/chans/bps, (const uint8_t *const *)&s->in[0], in_len/chans/bps);
615 if (ret < 0) return NULL;
616- out_len= ret*chans*2;
617+ out_len= ret*chans*bps;
618
619 memcpy(out, s->tmp[0], out_len);
620