--- /dev/null
+From 4361293fcf59edb56879c36edcd25f0a91e0edf8 Mon Sep 17 00:00:00 2001
+From: Mark Harris <mark.hsj@gmail.com>
+Date: Sat, 24 Nov 2018 13:02:02 -0800
+Subject: [PATCH] avutil/mem: Fix invalid use of av_alloc_size
+
+The alloc_size attribute is valid only on functions that return a
+pointer. GCC 9 (not yet released) warns about invalid usage:
+
+./libavutil/mem.h:342:1: warning: 'alloc_size' attribute ignored on a function returning int' [-Wattributes]
+ 342 | av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
+ | ^~~~~~~~~~~~~
+
+Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
+---
+ libavutil/mem.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libavutil/mem.h b/libavutil/mem.h
+index 55ae573ac9..5fb1a02dd9 100644
+--- a/libavutil/mem.h
++++ b/libavutil/mem.h
+@@ -339,7 +339,7 @@ av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size)
+ * @warning Unlike av_malloc(), the allocated memory is not guaranteed to be
+ * correctly aligned.
+ */
+-av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
++int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
+
+ /**
+ * Reallocate the given buffer if it is not large enough, otherwise do nothing.
+--
+2.21.0
+
PKG_CONFIG_PATH=$(BUILD/)contrib/lib/pkgconfig:$(PKG_CONFIG_PATH) \
CC="$(GCC.gcc)" \
CXX="$(GCC.gxx)" \
- CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O *D ?extra)" \
+ CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O *D *W ?extra)" \
LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O ?extra.exe)" \
PYTHON="$(PYTHON.exe)" \
--prefix=$(PREFIX) \
hb_work_private_t * pv = w->private_data;
uint8_t * pout = NULL;
int pout_len = 0;
- int64_t parser_pts;
+ int64_t parser_pts = AV_NOPTS_VALUE;
do
{
int result;
uint8_t * pout = NULL;
int pout_len = 0;
- int64_t parser_pts, parser_dts;
+ int64_t parser_pts = AV_NOPTS_VALUE;
+ int64_t parser_dts = AV_NOPTS_VALUE;
do
{
static void add_subtitle( hb_list_t * list_subtitle, int position,
iso639_lang_t * lang, int lang_extension,
- uint32_t * palette, int style )
+ uint8_t * palette, int style )
{
hb_subtitle_t * subtitle;
int ii, count;
// Add Wide Screen subtitle.
pos = (spu_control >> 16) & 0x1F;
add_subtitle(title->list_subtitle, pos, lang, lang_ext,
- vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->palette,
- HB_VOBSUB_STYLE_WIDE);
+ (uint8_t*)vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->palette,
+ HB_VOBSUB_STYLE_WIDE);
// permitted_df
// 1 - Letterbox not permitted
// Letterbox permitted. Add Letterbox subtitle.
pos = (spu_control >> 8) & 0x1F;
add_subtitle(title->list_subtitle, pos, lang, lang_ext,
- vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->palette,
- HB_VOBSUB_STYLE_LETTERBOX);
+ (uint8_t*)vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->palette,
+ HB_VOBSUB_STYLE_LETTERBOX);
}
if (!(vts->vtsi_mat->vts_video_attr.permitted_df & 2))
{
// Pan&Scan permitted. Add Pan&Scan subtitle.
pos = spu_control & 0x1F;
add_subtitle(title->list_subtitle, pos, lang, lang_ext,
- vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->palette,
- HB_VOBSUB_STYLE_PANSCAN);
+ (uint8_t*)vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->palette,
+ HB_VOBSUB_STYLE_PANSCAN);
}
}
else
{
pos = (spu_control >> 24) & 0x1F;
add_subtitle(title->list_subtitle, pos, lang, lang_ext,
- vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->palette,
- HB_VOBSUB_STYLE_4_3);
+ (uint8_t*)vts->vts_pgcit->pgci_srp[pgc_id-1].pgc->palette,
+ HB_VOBSUB_STYLE_4_3);
}
}
static void add_subtitle( hb_list_t * list_subtitle, int position,
iso639_lang_t * lang, int lang_extension,
- uint32_t * palette, int style )
+ uint8_t * palette, int style )
{
hb_subtitle_t * subtitle;
int ii, count;
// Add Wide Screen subtitle.
pos = (spu_control >> 16) & 0x1F;
add_subtitle(title->list_subtitle, pos, lang, lang_ext,
- ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette,
- HB_VOBSUB_STYLE_WIDE);
+ (uint8_t*)ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette,
+ HB_VOBSUB_STYLE_WIDE);
// permitted_df
// 1 - Letterbox not permitted
// Letterbox permitted. Add Letterbox subtitle.
pos = (spu_control >> 8) & 0x1F;
add_subtitle(title->list_subtitle, pos, lang, lang_ext,
- ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette,
- HB_VOBSUB_STYLE_LETTERBOX);
+ (uint8_t*)ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette,
+ HB_VOBSUB_STYLE_LETTERBOX);
}
if (!(ifo->vtsi_mat->vts_video_attr.permitted_df & 2))
{
// Pan&Scan permitted. Add Pan&Scan subtitle.
pos = spu_control & 0x1F;
add_subtitle(title->list_subtitle, pos, lang, lang_ext,
- ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette,
- HB_VOBSUB_STYLE_PANSCAN);
+ (uint8_t*)ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette,
+ HB_VOBSUB_STYLE_PANSCAN);
}
}
else
{
pos = (spu_control >> 24) & 0x1F;
add_subtitle(title->list_subtitle, pos, lang, lang_ext,
- ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette,
- HB_VOBSUB_STYLE_4_3);
+ (uint8_t*)ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette,
+ HB_VOBSUB_STYLE_4_3);
}
}
GCC.cxx_std = 0
GCC.ML = 1
GCC.H = 0
-GCC.W = all
+GCC.W = all no-format-truncation
GCC.archs =
GCC.sysroot =
GCC.minver =