--- modules/access/avio.c.orig	2015-10-22 00:58:47.000000000 +0800
+++ modules/access/avio.c	2024-09-30 04:06:06.000000000 +0800
@@ -152,8 +152,8 @@
     };
     AVDictionary *options = NULL;
     char *psz_opts = var_InheritString(access, "avio-options");
-    if (psz_opts && *psz_opts) {
-        options = vlc_av_get_options(psz_opts);
+    if (psz_opts) {
+        vlc_av_get_options(psz_opts, &options);
         free(psz_opts);
     }
     ret = avio_open2(&sys->context, url, AVIO_FLAG_READ, &cb, &options);
@@ -239,8 +239,8 @@
     };
     AVDictionary *options = NULL;
     char *psz_opts = var_InheritString(access, "sout-avio-options");
-    if (psz_opts && *psz_opts) {
-        options = vlc_av_get_options(psz_opts);
+    if (psz_opts) {
+        vlc_av_get_options(psz_opts, &options);
         free(psz_opts);
     }
     ret = avio_open2(&sys->context, access->psz_path, AVIO_FLAG_WRITE,

--- modules/codec/avcodec/avcodec.c.orig	2015-04-14 03:54:35.000000000 +0800
+++ modules/codec/avcodec/avcodec.c	2024-09-30 04:08:05.000000000 +0800
@@ -429,8 +429,8 @@
     int ret;
     char *psz_opts = var_InheritString( p_dec, "avcodec-options" );
     AVDictionary *options = NULL;
-    if (psz_opts && *psz_opts)
-        options = vlc_av_get_options(psz_opts);
+    if (psz_opts)
+        vlc_av_get_options(psz_opts, &options);
     free(psz_opts);
 
     vlc_avcodec_lock();

--- modules/codec/avcodec/subtitle.c.orig	2015-12-01 21:06:44.000000000 +0800
+++ modules/codec/avcodec/subtitle.c	2024-09-30 04:12:19.000000000 +0800
@@ -90,8 +90,8 @@
     int ret;
     char *psz_opts = var_InheritString(dec, "avcodec-options");
     AVDictionary *options = NULL;
-    if (psz_opts && *psz_opts)
-        options = vlc_av_get_options(psz_opts);
+    if (psz_opts)
+        vlc_av_get_options(psz_opts, &options);
     free(psz_opts);
 
     vlc_avcodec_lock();

--- modules/demux/avformat/demux.c.orig	2016-01-17 01:44:23.000000000 +0800
+++ modules/demux/avformat/demux.c	2024-09-30 04:12:50.000000000 +0800
@@ -333,8 +333,8 @@
     unsigned int nb_streams = p_sys->ic->nb_streams;
     for (unsigned i = 1; i < nb_streams; i++)
         options[i] = NULL;
-    if (psz_opts && *psz_opts) {
-        options[0] = vlc_av_get_options(psz_opts);
+    if (psz_opts) {
+        vlc_av_get_options(psz_opts, &options[0]);
         for (unsigned i = 1; i < nb_streams; i++) {
             av_dict_copy(&options[i], options[0], 0);
         }

--- modules/demux/avformat/mux.c.orig	2015-10-22 01:11:03.000000000 +0800
+++ modules/demux/avformat/mux.c	2024-09-30 04:14:00.000000000 +0800
@@ -374,8 +374,8 @@
 
         char *psz_opts = var_GetNonEmptyString( p_mux, "sout-avformat-options" );
         AVDictionary *options = NULL;
-        if (psz_opts && *psz_opts)
-            options = vlc_av_get_options(psz_opts);
+        if (psz_opts)
+            vlc_av_get_options(psz_opts, &options);
         free(psz_opts);
         error = avformat_write_header( p_sys->oc, options ? &options : NULL);
         AVDictionaryEntry *t = NULL;

--- modules/video_chroma/swscale.c
+++ modules/video_chroma/swscale.c
@@ -589,8 +589,9 @@ static void Convert( filter_t *p_filter, struct SwsContext *ctx,
 {
     filter_sys_t *p_sys = p_filter->p_sys;
     uint8_t palette[AVPALETTE_SIZE];
-    uint8_t *src[4]; int src_stride[4];
-    uint8_t *dst[4]; int dst_stride[4];
+    uint8_t *src[4], *dst[4];
+    const uint8_t *csrc[4];
+    int src_stride[4], dst_stride[4];
 
     GetPixels( src, src_stride, p_sys->desc_in, &p_filter->fmt_in.video,
                p_src, i_plane_count, b_swap_uvi );
@@ -607,11 +608,14 @@ static void Convert( filter_t *p_filter, struct SwsContext *ctx,
     GetPixels( dst, dst_stride, p_sys->desc_out, &p_filter->fmt_out.video,
                p_dst, i_plane_count, b_swap_uvo );
 
+    for (size_t i = 0; i < ARRAY_SIZE(src); i++)
+        csrc[i] = src[i];
+
 #if LIBSWSCALE_VERSION_INT  >= ((0<<16)+(5<<8)+0)
-    sws_scale( ctx, src, src_stride, 0, i_height,
+    sws_scale( ctx, csrc, src_stride, 0, i_height,
                dst, dst_stride );
 #else
-    sws_scale_ordered( ctx, src, src_stride, 0, i_height,
+    sws_scale_ordered( ctx, csrc, src_stride, 0, i_height,
                        dst, dst_stride );
 #endif
 }

--- modules/video_filter/deinterlace/yadif.h
+++ modules/video_filter/deinterlace/yadif.h
@@ -139,7 +139,11 @@ static void yadif_filter_line_c(uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8
     FILTER
 }
 
-static void yadif_filter_line_c_16bit(uint16_t *dst, uint16_t *prev, uint16_t *cur, uint16_t *next, int w, int prefs, int mrefs, int parity, int mode) {
+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) {
+    uint16_t *dst = (uint16_t *)dst8;
+    uint16_t *prev = (uint16_t *)prev8;
+    uint16_t *cur = (uint16_t *)cur8;
+    uint16_t *next = (uint16_t *)next8;
     int x;
     uint16_t *prev2= parity ? prev : cur ;
     uint16_t *next2= parity ? cur  : next;
