diff options
| -rw-r--r-- | meta-multimedia/recipes-multimedia/vlc/vlc/4645.patch | 179 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/vlc/vlc/4665.patch | 377 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/vlc/vlc_3.0.20.bb | 2 |
3 files changed, 558 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/4645.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/4645.patch new file mode 100644 index 0000000000..3f2aa60512 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/vlc/vlc/4645.patch | |||
| @@ -0,0 +1,179 @@ | |||
| 1 | From 1e2918115ca2f5c4ffde00dc02ad89525714f6c2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Thomas Guillem <thomas@gllm.fr> | ||
| 3 | Date: Tue, 5 Dec 2023 09:23:35 +0100 | ||
| 4 | Subject: [PATCH 1/5] input: fix incompatible-pointer-types assignment | ||
| 5 | |||
| 6 | Fixes #28441 | ||
| 7 | Upstream-Status: Backport [https://code.videolan.org/videolan/vlc/-/merge_requests/4645] | ||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | src/input/input_internal.h | 2 +- | ||
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 12 | |||
| 13 | diff --git a/src/input/input_internal.h b/src/input/input_internal.h | ||
| 14 | index d29731edca1b..ea02f39f5add 100644 | ||
| 15 | --- a/src/input/input_internal.h | ||
| 16 | +++ b/src/input/input_internal.h | ||
| 17 | @@ -117,7 +117,7 @@ typedef struct input_thread_private_t | ||
| 18 | |||
| 19 | /* Title infos FIXME multi-input (not easy) ? */ | ||
| 20 | int i_title; | ||
| 21 | - const input_title_t **title; | ||
| 22 | + input_title_t * const *title; | ||
| 23 | |||
| 24 | int i_title_offset; | ||
| 25 | int i_seekpoint_offset; | ||
| 26 | -- | ||
| 27 | GitLab | ||
| 28 | |||
| 29 | |||
| 30 | From adcf4e66e2ce2c382bb97957c91bfde040f4f3ca Mon Sep 17 00:00:00 2001 | ||
| 31 | From: Zhao Zhili <quinkblack@foxmail.com> | ||
| 32 | Date: Thu, 1 Mar 2018 14:25:59 +0800 | ||
| 33 | Subject: [PATCH 2/5] yadif: fix variable type | ||
| 34 | |||
| 35 | Signed-off-by: Thomas Guillem <thomas@gllm.fr> | ||
| 36 | (cherry picked from commit 77b86f4452be4dbe0d56a9cd1b66da61b116da60) | ||
| 37 | Signed-off-by: Thomas Guillem <thomas@gllm.fr> | ||
| 38 | --- | ||
| 39 | modules/video_filter/deinterlace/yadif.h | 8 ++++---- | ||
| 40 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 41 | |||
| 42 | diff --git a/modules/video_filter/deinterlace/yadif.h b/modules/video_filter/deinterlace/yadif.h | ||
| 43 | index 4bc592ba9307..af16443d0804 100644 | ||
| 44 | --- a/modules/video_filter/deinterlace/yadif.h | ||
| 45 | +++ b/modules/video_filter/deinterlace/yadif.h | ||
| 46 | @@ -140,10 +140,10 @@ static void yadif_filter_line_c(uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8 | ||
| 47 | } | ||
| 48 | |||
| 49 | static void yadif_filter_line_c_16bit(uint8_t *dst8, uint8_t *prev8, uint8_t *cur8, uint8_t *next8, int w, int prefs, int mrefs, int parity, int mode) { | ||
| 50 | - uint8_t *dst = (uint8_t *)dst8; | ||
| 51 | - uint8_t *prev = (uint8_t *)prev8; | ||
| 52 | - uint8_t *cur = (uint8_t *)cur8; | ||
| 53 | - uint8_t *next = (uint8_t *)next8; | ||
| 54 | + uint16_t *dst = (uint16_t *)dst8; | ||
| 55 | + uint16_t *prev = (uint16_t *)prev8; | ||
| 56 | + uint16_t *cur = (uint16_t *)cur8; | ||
| 57 | + uint16_t *next = (uint16_t *)next8; | ||
| 58 | int x; | ||
| 59 | uint16_t *prev2= parity ? prev : cur ; | ||
| 60 | uint16_t *next2= parity ? cur : next; | ||
| 61 | -- | ||
| 62 | GitLab | ||
| 63 | |||
| 64 | |||
| 65 | From 45198e5328ff2b2f4eb2fb76add0789fec26270f Mon Sep 17 00:00:00 2001 | ||
| 66 | From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> | ||
| 67 | Date: Sun, 3 Mar 2019 09:59:10 +0200 | ||
| 68 | Subject: [PATCH 3/5] swscale: avoid invalid pointer conversion | ||
| 69 | |||
| 70 | (cherry picked from commit ab00e6c59d42e05ab08893091783d8b5febc0058) | ||
| 71 | Signed-off-by: Thomas Guillem <thomas@gllm.fr> | ||
| 72 | --- | ||
| 73 | modules/video_chroma/swscale.c | 12 ++++++++---- | ||
| 74 | 1 file changed, 8 insertions(+), 4 deletions(-) | ||
| 75 | |||
| 76 | diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c | ||
| 77 | index 8993d11ec5dd..11897527355c 100644 | ||
| 78 | --- a/modules/video_chroma/swscale.c | ||
| 79 | +++ b/modules/video_chroma/swscale.c | ||
| 80 | @@ -588,8 +588,9 @@ static void Convert( filter_t *p_filter, struct SwsContext *ctx, | ||
| 81 | { | ||
| 82 | filter_sys_t *p_sys = p_filter->p_sys; | ||
| 83 | uint8_t palette[AVPALETTE_SIZE]; | ||
| 84 | - uint8_t *src[4]; int src_stride[4]; | ||
| 85 | - uint8_t *dst[4]; int dst_stride[4]; | ||
| 86 | + uint8_t *src[4], *dst[4]; | ||
| 87 | + const uint8_t *csrc[4]; | ||
| 88 | + int src_stride[4], dst_stride[4]; | ||
| 89 | |||
| 90 | GetPixels( src, src_stride, p_sys->desc_in, &p_filter->fmt_in.video, | ||
| 91 | p_src, i_plane_count, b_swap_uvi ); | ||
| 92 | @@ -606,11 +607,14 @@ static void Convert( filter_t *p_filter, struct SwsContext *ctx, | ||
| 93 | GetPixels( dst, dst_stride, p_sys->desc_out, &p_filter->fmt_out.video, | ||
| 94 | p_dst, i_plane_count, b_swap_uvo ); | ||
| 95 | |||
| 96 | + for (size_t i = 0; i < ARRAY_SIZE(src); i++) | ||
| 97 | + csrc[i] = src[i]; | ||
| 98 | + | ||
| 99 | #if LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0) | ||
| 100 | - sws_scale( ctx, src, src_stride, 0, i_height, | ||
| 101 | + sws_scale( ctx, csrc, src_stride, 0, i_height, | ||
| 102 | dst, dst_stride ); | ||
| 103 | #else | ||
| 104 | - sws_scale_ordered( ctx, src, src_stride, 0, i_height, | ||
| 105 | + sws_scale_ordered( ctx, csrc, src_stride, 0, i_height, | ||
| 106 | dst, dst_stride ); | ||
| 107 | #endif | ||
| 108 | } | ||
| 109 | -- | ||
| 110 | GitLab | ||
| 111 | |||
| 112 | |||
| 113 | From 4431076ad4a21fdcabd3f7ef1d61c45891689b0c Mon Sep 17 00:00:00 2001 | ||
| 114 | From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> | ||
| 115 | Date: Sun, 3 Mar 2019 17:20:04 +0200 | ||
| 116 | Subject: [PATCH 4/5] dynamicoverlay: fix variable shadowing | ||
| 117 | |||
| 118 | (cherry picked from commit d42e05d6b2c061ae352c131d5aebf8c8d8aa6d35) | ||
| 119 | Signed-off-by: Thomas Guillem <thomas@gllm.fr> | ||
| 120 | --- | ||
| 121 | modules/spu/dynamicoverlay/dynamicoverlay_commands.c | 3 +-- | ||
| 122 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
| 123 | |||
| 124 | diff --git a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c | ||
| 125 | index a93462925e8a..a85f9aafb0b9 100644 | ||
| 126 | --- a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c | ||
| 127 | +++ b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c | ||
| 128 | @@ -899,12 +899,11 @@ static const commanddesc_static_t p_commands[] = | ||
| 129 | void RegisterCommand( filter_t *p_filter ) | ||
| 130 | { | ||
| 131 | filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys; | ||
| 132 | - size_t i_index = 0; | ||
| 133 | |||
| 134 | p_sys->i_commands = ARRAY_SIZE(p_commands); | ||
| 135 | p_sys->pp_commands = (commanddesc_t **) calloc( p_sys->i_commands, sizeof(commanddesc_t*) ); | ||
| 136 | if( !p_sys->pp_commands ) return; | ||
| 137 | - for( i_index = 0; i_index < p_sys->i_commands; i_index ++ ) | ||
| 138 | + for( size_t i_index = 0; i_index < p_sys->i_commands; i_index ++ ) | ||
| 139 | { | ||
| 140 | p_sys->pp_commands[i_index] = (commanddesc_t *) malloc( sizeof(commanddesc_t) ); | ||
| 141 | if( !p_sys->pp_commands[i_index] ) return; | ||
| 142 | -- | ||
| 143 | GitLab | ||
| 144 | |||
| 145 | |||
| 146 | From fda14fc7c013eb75291df10cc8b88336c51328ad Mon Sep 17 00:00:00 2001 | ||
| 147 | From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> | ||
| 148 | Date: Mon, 26 Feb 2018 20:43:03 +0200 | ||
| 149 | Subject: [PATCH 5/5] dynamicoverlay: fix memory corruption | ||
| 150 | |||
| 151 | Font alpha is 8-bits, not 32-bits. | ||
| 152 | |||
| 153 | (cherry picked from commit 6f14081af7325d334a53126c4eea52bc30fc08a0) | ||
| 154 | Signed-off-by: Thomas Guillem <thomas@gllm.fr> | ||
| 155 | --- | ||
| 156 | modules/spu/dynamicoverlay/dynamicoverlay_commands.c | 6 +++++- | ||
| 157 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
| 158 | |||
| 159 | diff --git a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c | ||
| 160 | index a85f9aafb0b9..7a71c6f2373a 100644 | ||
| 161 | --- a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c | ||
| 162 | +++ b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c | ||
| 163 | @@ -234,8 +234,12 @@ static int parser_SetTextAlpha( char *psz_command, char *psz_end, | ||
| 164 | skip_space( &psz_command ); | ||
| 165 | if( isdigit( (unsigned char)*psz_command ) ) | ||
| 166 | { | ||
| 167 | - if( parse_digit( &psz_command, &p_params->fontstyle.i_font_alpha ) == VLC_EGENERIC ) | ||
| 168 | + int32_t value; | ||
| 169 | + | ||
| 170 | + if( parse_digit( &psz_command, &value ) == VLC_EGENERIC ) | ||
| 171 | return VLC_EGENERIC; | ||
| 172 | + | ||
| 173 | + p_params->fontstyle.i_font_alpha = value; | ||
| 174 | } | ||
| 175 | return VLC_SUCCESS; | ||
| 176 | } | ||
| 177 | -- | ||
| 178 | GitLab | ||
| 179 | |||
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/4665.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/4665.patch new file mode 100644 index 0000000000..c9ef33358e --- /dev/null +++ b/meta-multimedia/recipes-multimedia/vlc/vlc/4665.patch | |||
| @@ -0,0 +1,377 @@ | |||
| 1 | From 770789f265761fc7ab2de69ca105fec4ad93d9e2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> | ||
| 3 | Date: Mon, 26 Feb 2018 20:36:29 +0200 | ||
| 4 | Subject: [PATCH 1/9] chromaprint: missing cast | ||
| 5 | |||
| 6 | (cherry picked from commit 7bd5bab3e43ae187f7219db61ed85d06d2ba0547) | ||
| 7 | Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 8 | Upstream-Status: Backport [https://code.videolan.org/videolan/vlc/-/merge_requests/4665] | ||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | modules/stream_out/chromaprint.c | 2 +- | ||
| 12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/modules/stream_out/chromaprint.c b/modules/stream_out/chromaprint.c | ||
| 15 | index 80ec31ba2590..c76cbda3c2bb 100644 | ||
| 16 | --- a/modules/stream_out/chromaprint.c | ||
| 17 | +++ b/modules/stream_out/chromaprint.c | ||
| 18 | @@ -231,7 +231,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, | ||
| 19 | if ( !p_sys->b_finished && id->i_samples > 0 && p_buf->i_buffer ) | ||
| 20 | { | ||
| 21 | if(! chromaprint_feed( p_sys->p_chromaprint_ctx, | ||
| 22 | - p_buf->p_buffer, | ||
| 23 | + (int16_t *)p_buf->p_buffer, | ||
| 24 | p_buf->i_buffer / BYTESPERSAMPLE ) ) | ||
| 25 | msg_Warn( p_stream, "feed error" ); | ||
| 26 | id->i_samples -= i_samples; | ||
| 27 | -- | ||
| 28 | GitLab | ||
| 29 | |||
| 30 | |||
| 31 | From 6179d6b843f2a93af6a3d51c4244766e3eba9e77 Mon Sep 17 00:00:00 2001 | ||
| 32 | From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> | ||
| 33 | Date: Sun, 14 Apr 2019 09:41:38 +0300 | ||
| 34 | Subject: [PATCH 2/9] win32: wrap {g,s}etsockopt() | ||
| 35 | |||
| 36 | char * can alias anything, and Winsock relies on that. Unfortunately, | ||
| 37 | the compiler still issues warnings. This works around that. | ||
| 38 | |||
| 39 | (cherry picked from commit 36715d9b79f34824e126c2bc3aee2f1c1c16af46) | ||
| 40 | Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 41 | --- | ||
| 42 | include/vlc_network.h | 16 ++++++++++++++++ | ||
| 43 | 1 file changed, 16 insertions(+) | ||
| 44 | |||
| 45 | diff --git a/include/vlc_network.h b/include/vlc_network.h | ||
| 46 | index 010454a01c09..e39ffd0bacaa 100644 | ||
| 47 | --- a/include/vlc_network.h | ||
| 48 | +++ b/include/vlc_network.h | ||
| 49 | @@ -183,6 +183,22 @@ VLC_API int vlc_close(int); | ||
| 50 | |||
| 51 | /** @} */ | ||
| 52 | |||
| 53 | +#ifdef _WIN32 | ||
| 54 | +static inline int vlc_getsockopt(int s, int level, int name, | ||
| 55 | + void *val, socklen_t *len) | ||
| 56 | +{ | ||
| 57 | + return getsockopt(s, level, name, (char *)val, len); | ||
| 58 | +} | ||
| 59 | +#define getsockopt vlc_getsockopt | ||
| 60 | + | ||
| 61 | +static inline int vlc_setsockopt(int s, int level, int name, | ||
| 62 | + const void *val, socklen_t len) | ||
| 63 | +{ | ||
| 64 | + return setsockopt(s, level, name, (const char *)val, len); | ||
| 65 | +} | ||
| 66 | +#define setsockopt vlc_setsockopt | ||
| 67 | +#endif | ||
| 68 | + | ||
| 69 | /* Portable network names/addresses resolution layer */ | ||
| 70 | |||
| 71 | #define NI_MAXNUMERICHOST 64 | ||
| 72 | -- | ||
| 73 | GitLab | ||
| 74 | |||
| 75 | |||
| 76 | From 3391108f9709f0d77d9297c94371cf9cd30f2cbe Mon Sep 17 00:00:00 2001 | ||
| 77 | From: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 78 | Date: Thu, 7 Dec 2023 15:43:04 +0100 | ||
| 79 | Subject: [PATCH 3/9] netsync: use char for temporary local buffer | ||
| 80 | |||
| 81 | On Windows recvfrom/revc/sendto expects a char*. | ||
| 82 | --- | ||
| 83 | modules/control/netsync.c | 14 +++++++------- | ||
| 84 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
| 85 | |||
| 86 | diff --git a/modules/control/netsync.c b/modules/control/netsync.c | ||
| 87 | index 2a6a1a6a2bf8..8c91034d7cf2 100644 | ||
| 88 | --- a/modules/control/netsync.c | ||
| 89 | +++ b/modules/control/netsync.c | ||
| 90 | @@ -181,7 +181,7 @@ static void *Master(void *handle) | ||
| 91 | intf_sys_t *sys = intf->p_sys; | ||
| 92 | for (;;) { | ||
| 93 | struct pollfd ufd = { .fd = sys->fd, .events = POLLIN, }; | ||
| 94 | - uint64_t data[2]; | ||
| 95 | + char data[16]; | ||
| 96 | |||
| 97 | if (poll(&ufd, 1, -1) < 0) | ||
| 98 | continue; | ||
| 99 | @@ -198,8 +198,8 @@ static void *Master(void *handle) | ||
| 100 | if (master_system < 0) | ||
| 101 | continue; | ||
| 102 | |||
| 103 | - data[0] = hton64(mdate()); | ||
| 104 | - data[1] = hton64(master_system); | ||
| 105 | + SetQWBE(&data[0], mdate()); | ||
| 106 | + SetQWBE(&data[8], master_system); | ||
| 107 | |||
| 108 | /* Reply to the sender */ | ||
| 109 | sendto(sys->fd, data, 16, 0, | ||
| 110 | @@ -224,7 +224,7 @@ static void *Slave(void *handle) | ||
| 111 | |||
| 112 | for (;;) { | ||
| 113 | struct pollfd ufd = { .fd = sys->fd, .events = POLLIN, }; | ||
| 114 | - uint64_t data[2]; | ||
| 115 | + char data[16]; | ||
| 116 | |||
| 117 | vlc_tick_t system = GetPcrSystem(sys->input); | ||
| 118 | if (system < 0) | ||
| 119 | @@ -233,7 +233,7 @@ static void *Slave(void *handle) | ||
| 120 | /* Send clock request to the master */ | ||
| 121 | const vlc_tick_t send_date = mdate(); | ||
| 122 | |||
| 123 | - data[0] = hton64(system); | ||
| 124 | + SetQWBE(&data[0], system); | ||
| 125 | send(sys->fd, data, 8, 0); | ||
| 126 | |||
| 127 | /* Don't block */ | ||
| 128 | @@ -244,8 +244,8 @@ static void *Slave(void *handle) | ||
| 129 | if (recv(sys->fd, data, 16, 0) < 16) | ||
| 130 | goto wait; | ||
| 131 | |||
| 132 | - const vlc_tick_t master_date = ntoh64(data[0]); | ||
| 133 | - const vlc_tick_t master_system = ntoh64(data[1]); | ||
| 134 | + const vlc_tick_t master_date = GetQWBE(&data[0]); | ||
| 135 | + const vlc_tick_t master_system = GetQWBE(&data[8]); | ||
| 136 | const vlc_tick_t diff_date = receive_date - | ||
| 137 | ((receive_date - send_date) / 2 + master_date); | ||
| 138 | |||
| 139 | -- | ||
| 140 | GitLab | ||
| 141 | |||
| 142 | |||
| 143 | From 27e584d7b9add8dbbb82b7227228e1ec1e25a089 Mon Sep 17 00:00:00 2001 | ||
| 144 | From: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 145 | Date: Tue, 3 Jan 2023 13:23:00 +0100 | ||
| 146 | Subject: [PATCH 4/9] access/dtv: move the lfind() Windows hack in the module | ||
| 147 | |||
| 148 | So that we don't have to include search.h each time vlc_fixups.h is used. | ||
| 149 | |||
| 150 | The Win32 prototype of lfind() expects an unsigned* for 'nelp', not a size_t*. | ||
| 151 | |||
| 152 | (cherry picked from commit 7c43bcba27b6fe256456d93a9d32e10648f08da8) | ||
| 153 | Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 154 | --- | ||
| 155 | include/vlc_fixups.h | 3 +++ | ||
| 156 | modules/access/dtv/access.c | 5 +++++ | ||
| 157 | 2 files changed, 8 insertions(+) | ||
| 158 | |||
| 159 | diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h | ||
| 160 | index 37f788933779..861cb4cc5063 100644 | ||
| 161 | --- a/include/vlc_fixups.h | ||
| 162 | +++ b/include/vlc_fixups.h | ||
| 163 | @@ -501,8 +501,11 @@ void *tsearch( const void *key, void **rootp, int(*cmp)(const void *, const void | ||
| 164 | void *tfind( const void *key, const void **rootp, int(*cmp)(const void *, const void *) ); | ||
| 165 | void *tdelete( const void *key, void **rootp, int(*cmp)(const void *, const void *) ); | ||
| 166 | void twalk( const void *root, void(*action)(const void *nodep, VISIT which, int depth) ); | ||
| 167 | +#ifndef _WIN32 | ||
| 168 | +/* the Win32 prototype of lfind() expects an unsigned* for 'nmemb' */ | ||
| 169 | void *lfind( const void *key, const void *base, size_t *nmemb, | ||
| 170 | size_t size, int(*cmp)(const void *, const void *) ); | ||
| 171 | +#endif | ||
| 172 | #endif /* HAVE_SEARCH_H */ | ||
| 173 | #ifndef HAVE_TDESTROY | ||
| 174 | void tdestroy( void *root, void (*free_node)(void *nodep) ); | ||
| 175 | diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c | ||
| 176 | index d9756c7b4885..c6ca5005883c 100644 | ||
| 177 | --- a/modules/access/dtv/access.c | ||
| 178 | +++ b/modules/access/dtv/access.c | ||
| 179 | @@ -32,6 +32,11 @@ | ||
| 180 | #ifdef HAVE_SEARCH_H | ||
| 181 | #include <search.h> | ||
| 182 | #endif | ||
| 183 | +#if defined(_WIN32) | ||
| 184 | +/* the Win32 prototype of lfind() expects an unsigned* for 'nelp' */ | ||
| 185 | +# define lfind(a,b,c,d,e) \ | ||
| 186 | + lfind((a),(b), &(unsigned){ (*(c) > UINT_MAX) ? UINT_MAX : *(c) }, (d),(e)) | ||
| 187 | +#endif | ||
| 188 | |||
| 189 | #include "dtv/dtv.h" | ||
| 190 | |||
| 191 | -- | ||
| 192 | GitLab | ||
| 193 | |||
| 194 | |||
| 195 | From 5a9ca37a95b6e85e6beaaefba9aa4a886a45411c Mon Sep 17 00:00:00 2001 | ||
| 196 | From: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 197 | Date: Mon, 15 Jul 2019 12:41:29 +0200 | ||
| 198 | Subject: [PATCH 5/9] vlc_common: fix swab() calls on win32 that don't use | ||
| 199 | const on source pointer | ||
| 200 | |||
| 201 | (cherry picked from commit a9e0b1124e19225b903a2926951781e84002c410) | ||
| 202 | Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 203 | --- | ||
| 204 | include/vlc_common.h | 5 +++++ | ||
| 205 | 1 file changed, 5 insertions(+) | ||
| 206 | |||
| 207 | diff --git a/include/vlc_common.h b/include/vlc_common.h | ||
| 208 | index 8090b277150d..089878581763 100644 | ||
| 209 | --- a/include/vlc_common.h | ||
| 210 | +++ b/include/vlc_common.h | ||
| 211 | @@ -947,6 +947,11 @@ static inline void SetQWLE (void *p, uint64_t qw) | ||
| 212 | # define O_NONBLOCK 0 | ||
| 213 | # endif | ||
| 214 | |||
| 215 | +/* the mingw32 swab() and win32 _swab() prototypes expect a char* instead of a | ||
| 216 | + const void* */ | ||
| 217 | +# define swab(a,b,c) swab((char*) (a), (char*) (b), (c)) | ||
| 218 | + | ||
| 219 | + | ||
| 220 | # include <tchar.h> | ||
| 221 | #endif /* _WIN32 */ | ||
| 222 | |||
| 223 | -- | ||
| 224 | GitLab | ||
| 225 | |||
| 226 | |||
| 227 | From b758e19479a80604e3feb470b197e4a13a203a85 Mon Sep 17 00:00:00 2001 | ||
| 228 | From: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 229 | Date: Wed, 10 Jul 2019 08:23:45 +0200 | ||
| 230 | Subject: [PATCH 6/9] avcodec: encoder: fix MPEG4 matrix passed as const | ||
| 231 | |||
| 232 | lavc expects a pointer that it will free in avcodec_free_context(). | ||
| 233 | |||
| 234 | (cherry picked from commit d86c4c87aa78130a4fd00294e25df865d0e2b327) | ||
| 235 | Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 236 | --- | ||
| 237 | modules/codec/avcodec/encoder.c | 10 ++++++++-- | ||
| 238 | 1 file changed, 8 insertions(+), 2 deletions(-) | ||
| 239 | |||
| 240 | diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c | ||
| 241 | index 2b1c3604713d..4919ccf0e0e4 100644 | ||
| 242 | --- a/modules/codec/avcodec/encoder.c | ||
| 243 | +++ b/modules/codec/avcodec/encoder.c | ||
| 244 | @@ -588,8 +588,14 @@ int InitVideoEnc( vlc_object_t *p_this ) | ||
| 245 | |||
| 246 | if ( p_sys->b_mpeg4_matrix ) | ||
| 247 | { | ||
| 248 | - p_context->intra_matrix = mpeg4_default_intra_matrix; | ||
| 249 | - p_context->inter_matrix = mpeg4_default_non_intra_matrix; | ||
| 250 | + p_context->intra_matrix = av_malloc( sizeof(mpeg4_default_intra_matrix) ); | ||
| 251 | + if ( p_context->intra_matrix ) | ||
| 252 | + memcpy( p_context->intra_matrix, mpeg4_default_intra_matrix, | ||
| 253 | + sizeof(mpeg4_default_intra_matrix)); | ||
| 254 | + p_context->inter_matrix = av_malloc( sizeof(mpeg4_default_non_intra_matrix) ); | ||
| 255 | + if ( p_context->inter_matrix ) | ||
| 256 | + memcpy( p_context->inter_matrix, mpeg4_default_non_intra_matrix, | ||
| 257 | + sizeof(mpeg4_default_non_intra_matrix)); | ||
| 258 | } | ||
| 259 | |||
| 260 | if ( p_sys->b_pre_me ) | ||
| 261 | -- | ||
| 262 | GitLab | ||
| 263 | |||
| 264 | |||
| 265 | From 55be3ce60795a09d13861c5637c1fe7aebc5ce8b Mon Sep 17 00:00:00 2001 | ||
| 266 | From: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 267 | Date: Thu, 7 Dec 2023 14:18:22 +0100 | ||
| 268 | Subject: [PATCH 7/9] smb: fix potential string to wide string copy | ||
| 269 | |||
| 270 | The type of net_resource depends on the UNICODE define. | ||
| 271 | --- | ||
| 272 | modules/access/smb.c | 4 ++-- | ||
| 273 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 274 | |||
| 275 | diff --git a/modules/access/smb.c b/modules/access/smb.c | ||
| 276 | index 5fe56f0c9dfe..6add2a3e6278 100644 | ||
| 277 | --- a/modules/access/smb.c | ||
| 278 | +++ b/modules/access/smb.c | ||
| 279 | @@ -524,7 +524,7 @@ static void Win32AddConnection( stream_t *p_access, const char *psz_server, | ||
| 280 | const char *psz_pwd, const char *psz_domain ) | ||
| 281 | { | ||
| 282 | char psz_remote[MAX_PATH]; | ||
| 283 | - NETRESOURCE net_resource; | ||
| 284 | + NETRESOURCEA net_resource; | ||
| 285 | DWORD i_result; | ||
| 286 | VLC_UNUSED( psz_domain ); | ||
| 287 | |||
| 288 | @@ -544,7 +544,7 @@ static void Win32AddConnection( stream_t *p_access, const char *psz_server, | ||
| 289 | |||
| 290 | net_resource.lpRemoteName = psz_remote; | ||
| 291 | |||
| 292 | - i_result = WNetAddConnection2( &net_resource, psz_pwd, psz_user, 0 ); | ||
| 293 | + i_result = WNetAddConnection2A( &net_resource, psz_pwd, psz_user, 0 ); | ||
| 294 | |||
| 295 | if( i_result != NO_ERROR ) | ||
| 296 | { | ||
| 297 | -- | ||
| 298 | GitLab | ||
| 299 | |||
| 300 | |||
| 301 | From 5ae924bf212dce64a6424561d92426dbcc2cf3a0 Mon Sep 17 00:00:00 2001 | ||
| 302 | From: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 303 | Date: Wed, 6 Dec 2023 14:45:46 +0100 | ||
| 304 | Subject: [PATCH 8/9] dxva2: add missing mask initializers | ||
| 305 | |||
| 306 | --- | ||
| 307 | modules/codec/avcodec/dxva2.c | 10 +++++----- | ||
| 308 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
| 309 | |||
| 310 | diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c | ||
| 311 | index 18b872fe0fe3..2e6809a05410 100644 | ||
| 312 | --- a/modules/codec/avcodec/dxva2.c | ||
| 313 | +++ b/modules/codec/avcodec/dxva2.c | ||
| 314 | @@ -84,12 +84,12 @@ DEFINE_GUID(DXVA_Intel_H264_NoFGT_ClearVideo, 0x604F8E68, 0x4951, 0x4c54, | ||
| 315 | |||
| 316 | /* XXX Preferred format must come first */ | ||
| 317 | static const d3d9_format_t d3d_formats[] = { | ||
| 318 | - { "YV12", MAKEFOURCC('Y','V','1','2'), VLC_CODEC_YV12 }, | ||
| 319 | - { "NV12", MAKEFOURCC('N','V','1','2'), VLC_CODEC_NV12 }, | ||
| 320 | - //{ "IMC3", MAKEFOURCC('I','M','C','3'), VLC_CODEC_YV12 }, | ||
| 321 | - { "P010", MAKEFOURCC('P','0','1','0'), VLC_CODEC_P010 }, | ||
| 322 | + { "YV12", MAKEFOURCC('Y','V','1','2'), VLC_CODEC_YV12, 0,0,0 }, | ||
| 323 | + { "NV12", MAKEFOURCC('N','V','1','2'), VLC_CODEC_NV12, 0,0,0 }, | ||
| 324 | + //{ "IMC3", MAKEFOURCC('I','M','C','3'), VLC_CODEC_YV12, 0,0,0 }, | ||
| 325 | + { "P010", MAKEFOURCC('P','0','1','0'), VLC_CODEC_P010, 0,0,0 }, | ||
| 326 | |||
| 327 | - { NULL, 0, 0 } | ||
| 328 | + { NULL, 0, 0, 0,0,0 } | ||
| 329 | }; | ||
| 330 | |||
| 331 | static const d3d9_format_t *D3dFindFormat(D3DFORMAT format) | ||
| 332 | -- | ||
| 333 | GitLab | ||
| 334 | |||
| 335 | |||
| 336 | From 08c7a66780740679ba1b0abe9e30e73afc6bc271 Mon Sep 17 00:00:00 2001 | ||
| 337 | From: Steve Lhomme <robux4@ycbcr.xyz> | ||
| 338 | Date: Wed, 6 Dec 2023 07:48:29 +0100 | ||
| 339 | Subject: [PATCH 9/9] win32/modules: use cast with GetProcAddress function | ||
| 340 | pointers | ||
| 341 | |||
| 342 | --- | ||
| 343 | src/text/url.c | 3 ++- | ||
| 344 | src/win32/plugin.c | 3 ++- | ||
| 345 | 2 files changed, 4 insertions(+), 2 deletions(-) | ||
| 346 | |||
| 347 | diff --git a/src/text/url.c b/src/text/url.c | ||
| 348 | index b962eb31f849..2eb4b8d10817 100644 | ||
| 349 | --- a/src/text/url.c | ||
| 350 | +++ b/src/text/url.c | ||
| 351 | @@ -892,7 +892,8 @@ static int IdnToAscii(DWORD flags, LPCWSTR str, int len, LPWSTR buf, int size) | ||
| 352 | int (WINAPI *IdnToAsciiReal)(DWORD, LPCWSTR, int, LPWSTR, int); | ||
| 353 | int ret = 0; | ||
| 354 | |||
| 355 | - IdnToAsciiReal = GetProcAddress(h, "IdnToAscii"); | ||
| 356 | + IdnToAsciiReal = (int (WINAPI *)(DWORD, LPCWSTR, int, LPWSTR, int)) | ||
| 357 | + GetProcAddress(h, "IdnToAscii"); | ||
| 358 | if (IdnToAsciiReal != NULL) | ||
| 359 | ret = IdnToAsciiReal(flags, str, len, buf, size); | ||
| 360 | else | ||
| 361 | diff --git a/src/win32/plugin.c b/src/win32/plugin.c | ||
| 362 | index 1a65521fca75..b5c336eb99ca 100644 | ||
| 363 | --- a/src/win32/plugin.c | ||
| 364 | +++ b/src/win32/plugin.c | ||
| 365 | @@ -45,7 +45,8 @@ static BOOL WINAPI SetThreadErrorModeFallback(DWORD mode, DWORD *oldmode) | ||
| 366 | |||
| 367 | BOOL (WINAPI *SetThreadErrorModeReal)(DWORD, DWORD *); | ||
| 368 | |||
| 369 | - SetThreadErrorModeReal = GetProcAddress(h, "SetThreadErrorMode"); | ||
| 370 | + SetThreadErrorModeReal = (BOOL (WINAPI *)(DWORD, DWORD *)) | ||
| 371 | + GetProcAddress(h, "SetThreadErrorMode"); | ||
| 372 | if (SetThreadErrorModeReal != NULL) | ||
| 373 | return SetThreadErrorModeReal(mode, oldmode); | ||
| 374 | |||
| 375 | -- | ||
| 376 | GitLab | ||
| 377 | |||
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.20.bb b/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.20.bb index 21bc408f6d..2a6b27add0 100644 --- a/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.20.bb +++ b/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.20.bb | |||
| @@ -25,6 +25,8 @@ SRC_URI = "https://get.videolan.org/${BPN}/${PV}/${BP}.tar.xz \ | |||
| 25 | file://0006-configure-Disable-incompatible-function-pointer-type.patch \ | 25 | file://0006-configure-Disable-incompatible-function-pointer-type.patch \ |
| 26 | file://taglib-2.patch \ | 26 | file://taglib-2.patch \ |
| 27 | file://0001-taglib-Fix-build-on-x86-32-bit.patch \ | 27 | file://0001-taglib-Fix-build-on-x86-32-bit.patch \ |
| 28 | file://4645.patch \ | ||
| 29 | file://4665.patch \ | ||
| 28 | " | 30 | " |
| 29 | SRC_URI[sha256sum] = "adc7285b4d2721cddf40eb5270cada2aaa10a334cb546fd55a06353447ba29b5" | 31 | SRC_URI[sha256sum] = "adc7285b4d2721cddf40eb5270cada2aaa10a334cb546fd55a06353447ba29b5" |
| 30 | 32 | ||
