summaryrefslogtreecommitdiff
path: root/games-fps/alephone/files/alephone-20230119-c99.patch
blob: 7340e1fb2be0697bd3fecac1339c274009b3f762 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
https://github.com/Aleph-One-Marathon/alephone/pull/405
From: Matt Jolly <Matt.Jolly@footclan.ninja>
Date: Sat, 28 Jan 2023 18:03:51 +1100
Subject: [PATCH] use designated initialisers for SDL_ffmpegCodec*

These were failing to compile under clang16 as the old `audioBitrate`
was being jammed into `crf`, causing an incompatible integer conversion.
--- a/Source_Files/FFmpeg/SDL_ffmpeg.c
+++ b/Source_Files/FFmpeg/SDL_ffmpeg.c
@@ -155,41 +155,55 @@ int SDL_ffmpegDecodeVideoFrame( SDL_ffmpegFile*, AVPacket*, SDL_ffmpegVideoFrame
 
 const SDL_ffmpegCodec SDL_ffmpegCodecAUTO =
 {
-    -1,
-    720, 576,
-    1, 25,
-    6000000,
-    -1, -1,
-    -1,
-    2, 48000,
-    192000,
-    -1, -1
+    .videoCodecID=-1,
+    .width=720,
+    .height=576,
+    .framerateNum=1,
+    .framerateDen=25,
+    .videoBitrate=6000000,
+    .videoMinRate=-1,
+    .videoMaxRate=-1,
+    .audioCodecID=-1,
+    .channels=2,
+    .sampleRate=48000,
+    .cpuCount=-1,
+    .audioQuality=-1
 };
 
+
+
 const SDL_ffmpegCodec SDL_ffmpegCodecPALDVD =
 {
-    AV_CODEC_ID_MPEG2VIDEO,
-    720, 576,
-    1, 25,
-    6000000,
-    -1, -1,
-    AV_CODEC_ID_MP2,
-    2, 48000,
-    192000,
-    -1, -1
+    .videoCodecID=AV_CODEC_ID_MPEG2VIDEO,
+    .width=720,
+    .height=576,
+    .framerateNum=1,
+    .framerateDen=25,
+    .videoBitrate=6000000,
+    .videoMinRate=-1,
+    .videoMaxRate=-1,
+    .audioCodecID=AV_CODEC_ID_MP2,
+    .channels=2,
+    .sampleRate=48000,
+    .cpuCount=-1,
+    .audioQuality=-1
 };
 
 const SDL_ffmpegCodec SDL_ffmpegCodecPALDV =
 {
-    AV_CODEC_ID_DVVIDEO,
-    720, 576,
-    1, 25,
-    6553600,
-    -1, -1,
-    AV_CODEC_ID_DVAUDIO,
-    2, 48000,
-    256000,
-    -1, -1
+    .videoCodecID=AV_CODEC_ID_DVVIDEO,
+    .width=720,
+    .height=576,
+    .framerateNum=1,
+    .framerateDen=25,
+    .videoBitrate=6553600,
+    .videoMinRate=-1,
+    .videoMaxRate=-1,
+    .audioCodecID=AV_CODEC_ID_DVAUDIO,
+    .channels=2,
+    .sampleRate=48000,
+    .cpuCount=-1,
+    .audioQuality=-1
 };
 
 SDL_ffmpegFile* SDL_ffmpegCreateFile()
@@ -2269,4 +2283,4 @@ int SDL_ffmpegDecodeVideoFrame( SDL_ffmpegFile* file, AVPacket *pack, SDL_ffmpeg
 /**
 \endcond
 */
-#endif
\ No newline at end of file
+#endif