summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2017-09-25 22:30:06 +0000
committerjoerg <joerg@pkgsrc.org>2017-09-25 22:30:06 +0000
commit4bc50990862e3ed3218de5de6ec19cefecac4a3c (patch)
treea9a374831c09ff9b0f2f7c3464128f64c5b4cc5f
parent2f5fc702e83630a0dea7663285d59fbe8712e148 (diff)
downloadpkgsrc-4bc50990862e3ed3218de5de6ec19cefecac4a3c.tar.gz
Fix format strings. Fix missing prototypes. Fix missing return values.
Bump revision.
-rw-r--r--multimedia/libmp4v2/Makefile8
-rw-r--r--multimedia/libmp4v2/distinfo57
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_atom.c29
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_ctab.c13
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_ctts.c73
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_dimm.c37
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_dinf.c46
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_dmax.c38
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_dmed.c37
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_dref.c109
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_drep.c37
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_edts.c46
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_elst.c105
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_esds.c46
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_funcprotos.h445
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_gmhd.c41
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_gmin.c49
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_hdlr.c84
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_hinf.c57
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_hint.c59
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_hmhd.c53
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_iods.c53
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_matrix.c45
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_maxr.c42
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_mdat.c32
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_mdhd.c81
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_mdia.c65
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_minf.c76
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_moov.c31
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_mvhd.c39
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_nump.c37
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_payt.c41
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_pmax.c38
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_quicktime.c101
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_quicktime.h82
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_rtphint.c22
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_smhd.c47
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_stbl.c66
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_stco.c74
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_stsc.c83
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_stsd.c92
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_stsdtable.c182
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_stss.c74
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_stsz.c89
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_stts.c99
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_tkhd.c80
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_tmax.c38
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_tmin.c38
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_tpyl.c37
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_trpy.c37
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_udta.c57
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_util.c49
-rw-r--r--multimedia/libmp4v2/patches/patch-lib_mp4_vmhd.c56
-rw-r--r--multimedia/libmp4v2/patches/patch-server_util_avidump_avidump.c13
54 files changed, 3451 insertions, 14 deletions
diff --git a/multimedia/libmp4v2/Makefile b/multimedia/libmp4v2/Makefile
index c0dc306b8d8..7bd86b0ffd8 100644
--- a/multimedia/libmp4v2/Makefile
+++ b/multimedia/libmp4v2/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.17 2017/05/06 18:12:00 maya Exp $
+# $NetBSD: Makefile,v 1.18 2017/09/25 22:30:06 joerg Exp $
DISTNAME= mpeg4ip-1.6.1
PKGNAME= libmp4v2-1.6.1
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= multimedia
# distfile at sf is corrupt
#MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=mpeg4ip/}
@@ -27,10 +27,6 @@ OVERRIDE_DIRDEPTH= 3
# to install mp4* tools
BUILD_DIRS= . lib/mp4v2/util
-CFLAGS+= -std=gnu89
-BUILDLINK_TRANSFORM+= rm:-Werror
-BUILDLINK_TRANSFORM+= rm:-fpermissive
-
# lowercase min,max cannot be used as macros, conflicts with libstdc++6
SUBST_CLASSES+= minmax
SUBST_STAGE.minmax= post-patch
diff --git a/multimedia/libmp4v2/distinfo b/multimedia/libmp4v2/distinfo
index ec37854dece..025ae606195 100644
--- a/multimedia/libmp4v2/distinfo
+++ b/multimedia/libmp4v2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2017/05/16 09:25:10 jperkin Exp $
+$NetBSD: distinfo,v 1.17 2017/09/25 22:30:06 joerg Exp $
SHA1 (mpeg4ip-1.6.1.tar.gz) = 2af97fc0da6a5c0bcb7b433c6715967487b80e38
RMD160 (mpeg4ip-1.6.1.tar.gz) = ee8375d9581cccbbf685f730bb36f3866eaf12f7
@@ -28,15 +28,63 @@ SHA1 (patch-av) = 3b25351b26124c9a546c09d55900fe8df3224f6d
SHA1 (patch-common_video_iso-mpeg4_include_basic.hpp) = 457aa492ef05abf0af8a17fea202ae18c28f1cc3
SHA1 (patch-common_video_iso-mpeg4_src_type__basic.cpp) = 01f8b446af8cd7f012d2837bdbb13d13e4e6ac93
SHA1 (patch-doc_mp4v2_MP4.3) = e799c63f63cdb1d360077b6f1410a081c1a49c5a
-SHA1 (patch-lib_mp4_ctts.c) = c4d9b1df5b5940e4a0fbed37c0b52d330db9b310
-SHA1 (patch-lib_mp4_funcprotos.h) = 4a6ae557af14ca352bf8b712e52f91243a5f2ed4
+SHA1 (patch-lib_mp4_atom.c) = 31e691f5f8bf8e7cf40ac2c55d61be1e5265ac2e
+SHA1 (patch-lib_mp4_ctab.c) = 334ee9a4d85705cb5fb029fd6925113328066b88
+SHA1 (patch-lib_mp4_ctts.c) = 0d4ac3bfa577859488af3e271593cf2f166646bb
+SHA1 (patch-lib_mp4_dimm.c) = 7f979d27d4c1b665746a716177afcd4dd81b28b4
+SHA1 (patch-lib_mp4_dinf.c) = b93b807df312400992432817ef4fdf3feab17f06
+SHA1 (patch-lib_mp4_dmax.c) = e9590efb35150afb43087fc2615393bd03a38db5
+SHA1 (patch-lib_mp4_dmed.c) = 6beea57b94b5ff78e6f498caf5de509a40f9ca5c
+SHA1 (patch-lib_mp4_dref.c) = 6cb51d22e6e69d126cdcccf11a7723fd1fd41b80
+SHA1 (patch-lib_mp4_drep.c) = 965f45241ff79d14e290b9edb686484dabc4ad8c
+SHA1 (patch-lib_mp4_edts.c) = 3ad554b6f85e9ddf82cb906a53ac90c74936bfe4
+SHA1 (patch-lib_mp4_elst.c) = d31b88b0c3779fccdd5627e7b977b65c062c4bb4
+SHA1 (patch-lib_mp4_esds.c) = 41b3083c64fc5c47d541406e179158044ca95c42
+SHA1 (patch-lib_mp4_funcprotos.h) = f20ce278c1a5e0e10824cd7433e525c4bbf1dc03
+SHA1 (patch-lib_mp4_gmhd.c) = f9c754959d3ec5ddab5d7423e17bb038eb131719
+SHA1 (patch-lib_mp4_gmin.c) = 5d3c2065479e7b1428742961acbfd858313cc4d8
+SHA1 (patch-lib_mp4_hdlr.c) = f7f5c7985a5275995ae05d8db9120a1841b58668
+SHA1 (patch-lib_mp4_hinf.c) = f7a112af971ae6b8042be5e75ea263745211c164
+SHA1 (patch-lib_mp4_hint.c) = 5e05bc75122e285414bc8885fc92614ece2e2366
SHA1 (patch-lib_mp4_hinthnti.c) = bbb4f2f7e0b3401668f756252b91109f47382cbf
SHA1 (patch-lib_mp4_hintudta.c) = d567138632559d1dd9311a2868ebc29416be918b
+SHA1 (patch-lib_mp4_hmhd.c) = 509b297a7f36dc5a835a733b7c50572ef1ad6fd2
SHA1 (patch-lib_mp4_hnti.c) = 21b1abf140368a8ff48b656e5b7c1297e95ac1c9
+SHA1 (patch-lib_mp4_iods.c) = 48623d6f6e0e31498e30b155a4dbcd874da56c4a
+SHA1 (patch-lib_mp4_matrix.c) = 17da1f646b8323529004488afb35c7abec3dcd25
+SHA1 (patch-lib_mp4_maxr.c) = 96b15bd7aa36ff74f146ac583d073b855cbe3da7
+SHA1 (patch-lib_mp4_mdat.c) = 58008a9c51dcf5928758a62b91cfb29402aa0aae
+SHA1 (patch-lib_mp4_mdhd.c) = dc49504b2fc144aa755b3dd2a07d5646952a1a40
+SHA1 (patch-lib_mp4_mdia.c) = f4b34690f87f8d100ef5fc50b84a0c8886c06c15
+SHA1 (patch-lib_mp4_minf.c) = 9e8acadfac14773e18f2db2041ceb78b8ed85d2c
+SHA1 (patch-lib_mp4_moov.c) = 2ea18f6e9a60aedde0a1ec71f1bb1d4279469cdd
+SHA1 (patch-lib_mp4_mvhd.c) = 09245bd5f142b14fdc919e08495969bb3c6d15af
+SHA1 (patch-lib_mp4_nump.c) = 126498cc46928290bb204a2496e6b9f98ba51a8b
+SHA1 (patch-lib_mp4_payt.c) = 33859a4f5b428015c5a9fbcc6964b6b913458001
+SHA1 (patch-lib_mp4_pmax.c) = bb1f45b7117d34e5a2452a4b32aa003a2b2ebd37
+SHA1 (patch-lib_mp4_quicktime.c) = 239155d77ba89016de44d96685eca8b5092f06ec
+SHA1 (patch-lib_mp4_quicktime.h) = d5ee21997203021cfda39826f19c6e0073c858d7
SHA1 (patch-lib_mp4_rtp.c) = 903209c21444a788583be1fa27393c909fbbf65c
+SHA1 (patch-lib_mp4_rtphint.c) = fb85fcfeba1a56cd99561a2987554db9d8dc692a
SHA1 (patch-lib_mp4_sdp.c) = 9c9e18d84d151ca632c25c9aa52685d476e6435f
+SHA1 (patch-lib_mp4_smhd.c) = dfbc4f1f49522664af4f3133593dd7363e1a2918
+SHA1 (patch-lib_mp4_stbl.c) = 86116139b582d03c5ceb2d7b811758868cd89def
+SHA1 (patch-lib_mp4_stco.c) = ef5fcd396553d4f0312554d5a0f7c5581e6fa2fd
+SHA1 (patch-lib_mp4_stsc.c) = d1eb81a5d20998f3c3a303206417a3f4eb6dd20e
+SHA1 (patch-lib_mp4_stsd.c) = 6b0b828957cc1f9e7d75aaefccb913992679e438
+SHA1 (patch-lib_mp4_stsdtable.c) = c70448586a31a5531d8f229cc8e1e7d3889ee259
+SHA1 (patch-lib_mp4_stss.c) = 7dda65fe7038bed8e83e34d395f7afd3b5e374fc
+SHA1 (patch-lib_mp4_stsz.c) = 49340d305f77b32e9e3eeee679d7cb2bdd840758
+SHA1 (patch-lib_mp4_stts.c) = 3c5fe9a7ecb17e12173fb533e28c23bced6cd52b
+SHA1 (patch-lib_mp4_tkhd.c) = 1edecbcc517ae87b64beff03ae2472d569dddee4
+SHA1 (patch-lib_mp4_tmax.c) = 54453885de8a6beaab51cfba891a0f5fd5fa39e2
+SHA1 (patch-lib_mp4_tmin.c) = 69a78b475a60b618fd0f18abbfc89218ed83c312
+SHA1 (patch-lib_mp4_tpyl.c) = c3b9c97195152672c6a10e08b00d8ba9c8437098
SHA1 (patch-lib_mp4_tref.c) = c67a0a7b6fb5079736ef8f5e5aaa3628badecfdd
-SHA1 (patch-lib_mp4_udta.c) = af025f404668d1bc02861620b79d6a56fbe18295
+SHA1 (patch-lib_mp4_trpy.c) = dcc972c9531a9a0747c49a55c906e801c89860cc
+SHA1 (patch-lib_mp4_udta.c) = 5823e5565a62b5971ffb672022ddee2bf5e46d22
+SHA1 (patch-lib_mp4_util.c) = b91ad65df67777501cc9630759e603debbeb3abe
+SHA1 (patch-lib_mp4_vmhd.c) = 79035ada521e970b460a6ffffc77ee8f7b62707f
SHA1 (patch-lib_mp4v2_atom__standard.cpp) = 27a2bac270ac4a1fd5169d89d312690a4dcb58ab
SHA1 (patch-lib_mp4v2_mp4atom.cpp) = ad0a1006293d8bea250de695919d8cdc59a7a4fa
SHA1 (patch-lib_rtp_net__udp.c) = 3250d0ebcc0899ec4521eb20bc83f6e8a8bce3c9
@@ -45,3 +93,4 @@ SHA1 (patch-player_lib_audio_faad_config.c) = 6448e02ed9f95fc94bca986958ac61c0bf
SHA1 (patch-player_lib_audio_faad_huffdec.c) = 1106e902c3fe95cb76009613ae6641339580adac
SHA1 (patch-player_lib_audio_faad_monopred.c) = 0833f17e10f91b69c63c896c15e98471c62f3025
SHA1 (patch-player_src_media__utils.cpp) = d11bcfe9ade690e14686e1091b7f5c834068cd3c
+SHA1 (patch-server_util_avidump_avidump.c) = 44325969ea8f4cee92c6a384f78be6165ef536f4
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_atom.c b/multimedia/libmp4v2/patches/patch-lib_mp4_atom.c
new file mode 100644
index 00000000000..e2eaea50794
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_atom.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-lib_mp4_atom.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/atom.c.orig 2017-09-25 14:43:07.119068459 +0000
++++ lib/mp4/atom.c
+@@ -1,5 +1,7 @@
+ #include "quicktime.h"
+
++int quicktime_atom_read_type(char *data, char *type);
++
+
+ int quicktime_atom_reset(quicktime_atom_t *atom)
+ {
+@@ -60,14 +62,14 @@ int quicktime_atom_read_header(quicktime
+ return result;
+ }
+
+-int quicktime_atom_write_header(quicktime_t *file, quicktime_atom_t *atom, char *text)
++void quicktime_atom_write_header(quicktime_t *file, quicktime_atom_t *atom, char *text)
+ {
+ atom->start = quicktime_position(file);
+ quicktime_write_int32(file, 0);
+ quicktime_write_char32(file, text);
+ }
+
+-int quicktime_atom_write_footer(quicktime_t *file, quicktime_atom_t *atom)
++void quicktime_atom_write_footer(quicktime_t *file, quicktime_atom_t *atom)
+ {
+ atom->end = quicktime_position(file);
+ quicktime_set_position(file, atom->start);
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_ctab.c b/multimedia/libmp4v2/patches/patch-lib_mp4_ctab.c
new file mode 100644
index 00000000000..a978620f60a
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_ctab.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-lib_mp4_ctab.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/ctab.c.orig 2017-09-25 14:45:45.288644518 +0000
++++ lib/mp4/ctab.c
+@@ -22,7 +22,7 @@ int quicktime_ctab_delete(quicktime_ctab
+ return 0;
+ }
+
+-int quicktime_ctab_dump(quicktime_ctab_t *ctab)
++void quicktime_ctab_dump(quicktime_ctab_t *ctab)
+ {
+ int i;
+ printf(" color table\n");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_ctts.c b/multimedia/libmp4v2/patches/patch-lib_mp4_ctts.c
index 3a24704d928..de55c985237 100644
--- a/multimedia/libmp4v2/patches/patch-lib_mp4_ctts.c
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_ctts.c
@@ -1,9 +1,71 @@
-$NetBSD: patch-lib_mp4_ctts.c,v 1.1 2017/05/06 18:12:00 maya Exp $
+$NetBSD: patch-lib_mp4_ctts.c,v 1.2 2017/09/25 22:30:06 joerg Exp $
Fix return type. we're not returning anything.
--- lib/mp4/ctts.c.orig 2001-08-01 00:34:00.000000000 +0000
+++ lib/mp4/ctts.c
+@@ -22,7 +22,7 @@
+ #include "quicktime.h"
+
+
+-int quicktime_ctts_init(quicktime_ctts_t *ctts)
++void quicktime_ctts_init(quicktime_ctts_t *ctts)
+ {
+ ctts->version = 0;
+ ctts->flags = 0;
+@@ -30,7 +30,7 @@ int quicktime_ctts_init(quicktime_ctts_t
+ ctts->entries_allocated = 0;
+ }
+
+-int quicktime_ctts_init_table(quicktime_ctts_t *ctts)
++void quicktime_ctts_init_table(quicktime_ctts_t *ctts)
+ {
+ if (!ctts->entries_allocated) {
+ ctts->entries_allocated = 1;
+@@ -40,7 +40,7 @@ int quicktime_ctts_init_table(quicktime_
+ }
+ }
+
+-int quicktime_ctts_init_common(quicktime_t *file, quicktime_ctts_t *ctts)
++void quicktime_ctts_init_common(quicktime_t *file, quicktime_ctts_t *ctts)
+ {
+ quicktime_ctts_table_t *table;
+ quicktime_ctts_init_table(ctts);
+@@ -50,7 +50,7 @@ int quicktime_ctts_init_common(quicktime
+ table->sample_offset = 0;
+ }
+
+-int quicktime_ctts_delete(quicktime_ctts_t *ctts)
++void quicktime_ctts_delete(quicktime_ctts_t *ctts)
+ {
+ if (ctts->total_entries) {
+ free(ctts->table);
+@@ -58,13 +58,13 @@ int quicktime_ctts_delete(quicktime_ctts
+ ctts->total_entries = 0;
+ }
+
+-int quicktime_ctts_dump(quicktime_ctts_t *ctts)
++void quicktime_ctts_dump(quicktime_ctts_t *ctts)
+ {
+ int i;
+ printf(" composition time to sample\n");
+ printf(" version %d\n", ctts->version);
+- printf(" flags %d\n", ctts->flags);
+- printf(" total_entries %d\n", ctts->total_entries);
++ printf(" flags %ld\n", ctts->flags);
++ printf(" total_entries %ld\n", ctts->total_entries);
+ for(i = 0; i < ctts->total_entries; i++) {
+ printf(" count %ld offset %ld\n",
+ ctts->table[i].sample_count,
+@@ -72,7 +72,7 @@ int quicktime_ctts_dump(quicktime_ctts_t
+ }
+ }
+
+-int quicktime_read_ctts(quicktime_t *file, quicktime_ctts_t *ctts)
++void quicktime_read_ctts(quicktime_t *file, quicktime_ctts_t *ctts)
+ {
+ int i;
+ ctts->version = quicktime_read_char(file);
@@ -88,7 +88,7 @@ int quicktime_read_ctts(quicktime_t *fil
}
}
@@ -13,3 +75,12 @@ Fix return type. we're not returning anything.
{
int i;
quicktime_atom_t atom;
+@@ -113,7 +113,7 @@ int quicktime_write_ctts(quicktime_t *fi
+ quicktime_atom_write_footer(file, &atom);
+ }
+
+-int quicktime_update_ctts(quicktime_ctts_t *ctts, long sample_offset)
++void quicktime_update_ctts(quicktime_ctts_t *ctts, long sample_offset)
+ {
+ if (sample_offset == ctts->table[ctts->total_entries-1].sample_offset) {
+ ctts->table[ctts->total_entries-1].sample_count++;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_dimm.c b/multimedia/libmp4v2/patches/patch-lib_mp4_dimm.c
new file mode 100644
index 00000000000..9fe1dc67c3b
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_dimm.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-lib_mp4_dimm.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/dimm.c.orig 2017-09-25 14:47:23.811471892 +0000
++++ lib/mp4/dimm.c
+@@ -22,27 +22,27 @@
+ #include "quicktime.h"
+
+
+-int quicktime_dimm_init(quicktime_dimm_t *dimm)
++void quicktime_dimm_init(quicktime_dimm_t *dimm)
+ {
+ dimm->numBytes = 0;
+ }
+
+-int quicktime_dimm_delete(quicktime_dimm_t *dimm)
++void quicktime_dimm_delete(quicktime_dimm_t *dimm)
+ {
+ }
+
+-int quicktime_dimm_dump(quicktime_dimm_t *dimm)
++void quicktime_dimm_dump(quicktime_dimm_t *dimm)
+ {
+ printf(" total immediate bytes\n");
+ printf(" numBytes "U64"\n", dimm->numBytes);
+ }
+
+-int quicktime_read_dimm(quicktime_t *file, quicktime_dimm_t *dimm)
++void quicktime_read_dimm(quicktime_t *file, quicktime_dimm_t *dimm)
+ {
+ dimm->numBytes = quicktime_read_int64(file);
+ }
+
+-int quicktime_write_dimm(quicktime_t *file, quicktime_dimm_t *dimm)
++void quicktime_write_dimm(quicktime_t *file, quicktime_dimm_t *dimm)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_dinf.c b/multimedia/libmp4v2/patches/patch-lib_mp4_dinf.c
new file mode 100644
index 00000000000..a0553a51f83
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_dinf.c
@@ -0,0 +1,46 @@
+$NetBSD: patch-lib_mp4_dinf.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/dinf.c.orig 2017-09-25 14:47:48.241855167 +0000
++++ lib/mp4/dinf.c
+@@ -1,27 +1,27 @@
+ #include "quicktime.h"
+
+-int quicktime_dinf_init(quicktime_dinf_t *dinf)
++void quicktime_dinf_init(quicktime_dinf_t *dinf)
+ {
+ quicktime_dref_init(&(dinf->dref));
+ }
+
+-int quicktime_dinf_delete(quicktime_dinf_t *dinf)
++void quicktime_dinf_delete(quicktime_dinf_t *dinf)
+ {
+ quicktime_dref_delete(&(dinf->dref));
+ }
+
+-int quicktime_dinf_init_all(quicktime_dinf_t *dinf)
++void quicktime_dinf_init_all(quicktime_dinf_t *dinf)
+ {
+ quicktime_dref_init_all(&(dinf->dref));
+ }
+
+-int quicktime_dinf_dump(quicktime_dinf_t *dinf)
++void quicktime_dinf_dump(quicktime_dinf_t *dinf)
+ {
+ printf(" data information (dinf)\n");
+ quicktime_dref_dump(&(dinf->dref));
+ }
+
+-int quicktime_read_dinf(quicktime_t *file, quicktime_dinf_t *dinf, quicktime_atom_t *dinf_atom)
++void quicktime_read_dinf(quicktime_t *file, quicktime_dinf_t *dinf, quicktime_atom_t *dinf_atom)
+ {
+ quicktime_atom_t leaf_atom;
+
+@@ -35,7 +35,7 @@ int quicktime_read_dinf(quicktime_t *fil
+ }while(quicktime_position(file) < dinf_atom->end);
+ }
+
+-int quicktime_write_dinf(quicktime_t *file, quicktime_dinf_t *dinf)
++void quicktime_write_dinf(quicktime_t *file, quicktime_dinf_t *dinf)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, "dinf");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_dmax.c b/multimedia/libmp4v2/patches/patch-lib_mp4_dmax.c
new file mode 100644
index 00000000000..6363a60f4f4
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_dmax.c
@@ -0,0 +1,38 @@
+$NetBSD: patch-lib_mp4_dmax.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/dmax.c.orig 2017-09-25 14:52:25.608992194 +0000
++++ lib/mp4/dmax.c
+@@ -22,27 +22,27 @@
+ #include "quicktime.h"
+
+
+-int quicktime_dmax_init(quicktime_dmax_t *dmax)
++void quicktime_dmax_init(quicktime_dmax_t *dmax)
+ {
+ dmax->milliSecs = 0;
+ }
+
+-int quicktime_dmax_delete(quicktime_dmax_t *dmax)
++void quicktime_dmax_delete(quicktime_dmax_t *dmax)
+ {
+ }
+
+-int quicktime_dmax_dump(quicktime_dmax_t *dmax)
++void quicktime_dmax_dump(quicktime_dmax_t *dmax)
+ {
+ printf(" max packet duration\n");
+- printf(" milliSecs %lu\n", dmax->milliSecs);
++ printf(" milliSecs %u\n", (unsigned)dmax->milliSecs);
+ }
+
+-int quicktime_read_dmax(quicktime_t *file, quicktime_dmax_t *dmax)
++void quicktime_read_dmax(quicktime_t *file, quicktime_dmax_t *dmax)
+ {
+ dmax->milliSecs = quicktime_read_int32(file);
+ }
+
+-int quicktime_write_dmax(quicktime_t *file, quicktime_dmax_t *dmax)
++void quicktime_write_dmax(quicktime_t *file, quicktime_dmax_t *dmax)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_dmed.c b/multimedia/libmp4v2/patches/patch-lib_mp4_dmed.c
new file mode 100644
index 00000000000..6f11be38002
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_dmed.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-lib_mp4_dmed.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/dmed.c.orig 2017-09-25 14:52:16.963414472 +0000
++++ lib/mp4/dmed.c
+@@ -22,27 +22,27 @@
+ #include "quicktime.h"
+
+
+-int quicktime_dmed_init(quicktime_dmed_t *dmed)
++void quicktime_dmed_init(quicktime_dmed_t *dmed)
+ {
+ dmed->numBytes = 0;
+ }
+
+-int quicktime_dmed_delete(quicktime_dmed_t *dmed)
++void quicktime_dmed_delete(quicktime_dmed_t *dmed)
+ {
+ }
+
+-int quicktime_dmed_dump(quicktime_dmed_t *dmed)
++void quicktime_dmed_dump(quicktime_dmed_t *dmed)
+ {
+ printf(" total media bytes\n");
+ printf(" numBytes "U64"\n", dmed->numBytes);
+ }
+
+-int quicktime_read_dmed(quicktime_t *file, quicktime_dmed_t *dmed)
++void quicktime_read_dmed(quicktime_t *file, quicktime_dmed_t *dmed)
+ {
+ dmed->numBytes = quicktime_read_int64(file);
+ }
+
+-int quicktime_write_dmed(quicktime_t *file, quicktime_dmed_t *dmed)
++void quicktime_write_dmed(quicktime_t *file, quicktime_dmed_t *dmed)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_dref.c b/multimedia/libmp4v2/patches/patch-lib_mp4_dref.c
new file mode 100644
index 00000000000..4c8392675c1
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_dref.c
@@ -0,0 +1,109 @@
+$NetBSD: patch-lib_mp4_dref.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/dref.c.orig 2017-09-25 14:52:00.003467817 +0000
++++ lib/mp4/dref.c
+@@ -1,6 +1,6 @@
+ #include "quicktime.h"
+
+-int quicktime_dref_table_init(quicktime_dref_table_t *table)
++void quicktime_dref_table_init(quicktime_dref_table_t *table)
+ {
+ table->size = 0;
+ table->type[0] = 'a';
+@@ -13,13 +13,13 @@ int quicktime_dref_table_init(quicktime_
+ table->data_reference[0] = 0;
+ }
+
+-int quicktime_dref_table_delete(quicktime_dref_table_t *table)
++void quicktime_dref_table_delete(quicktime_dref_table_t *table)
+ {
+ if(table->data_reference) free(table->data_reference);
+ table->data_reference = 0;
+ }
+
+-int quicktime_read_dref_table(quicktime_t *file, quicktime_dref_table_t *table)
++void quicktime_read_dref_table(quicktime_t *file, quicktime_dref_table_t *table)
+ {
+ table->size = quicktime_read_int32(file);
+ quicktime_read_char32(file, table->type);
+@@ -33,7 +33,7 @@ int quicktime_read_dref_table(quicktime_
+ table->data_reference[table->size - 12] = 0;
+ }
+
+-int quicktime_write_dref_table(quicktime_t *file, quicktime_dref_table_t *table)
++void quicktime_write_dref_table(quicktime_t *file, quicktime_dref_table_t *table)
+ {
+ int len = strlen(table->data_reference);
+ quicktime_write_int32(file, 12 + len);
+@@ -44,17 +44,17 @@ int quicktime_write_dref_table(quicktime
+ quicktime_write_data(file, table->data_reference, len);
+ }
+
+-int quicktime_dref_table_dump(quicktime_dref_table_t *table)
++void quicktime_dref_table_dump(quicktime_dref_table_t *table)
+ {
+ printf(" data reference table (dref)\n");
+ printf(" type %c%c%c%c\n", table->type[0], table->type[1], table->type[2], table->type[3]);
+ printf(" version %d\n", table->version);
+- printf(" flags %d\n", table->flags);
++ printf(" flags %ld\n", table->flags);
+ printf(" data %s\n", table->data_reference);
+ }
+
+
+-int quicktime_dref_init(quicktime_dref_t *dref)
++void quicktime_dref_init(quicktime_dref_t *dref)
+ {
+ dref->version = 0;
+ dref->flags = 0;
+@@ -62,7 +62,7 @@ int quicktime_dref_init(quicktime_dref_t
+ dref->table = 0;
+ }
+
+-int quicktime_dref_init_all(quicktime_dref_t *dref)
++void quicktime_dref_init_all(quicktime_dref_t *dref)
+ {
+ if(!dref->total_entries)
+ {
+@@ -72,7 +72,7 @@ int quicktime_dref_init_all(quicktime_dr
+ }
+ }
+
+-int quicktime_dref_delete(quicktime_dref_t *dref)
++void quicktime_dref_delete(quicktime_dref_t *dref)
+ {
+ if(dref->table)
+ {
+@@ -84,20 +84,20 @@ int quicktime_dref_delete(quicktime_dref
+ dref->total_entries = 0;
+ }
+
+-int quicktime_dref_dump(quicktime_dref_t *dref)
++void quicktime_dref_dump(quicktime_dref_t *dref)
+ {
+ int i;
+
+ printf(" data reference (dref)\n");
+ printf(" version %d\n", dref->version);
+- printf(" flags %d\n", dref->flags);
++ printf(" flags %ld\n", dref->flags);
+ for(i = 0; i < dref->total_entries; i++)
+ {
+ quicktime_dref_table_dump(&(dref->table[i]));
+ }
+ }
+
+-int quicktime_read_dref(quicktime_t *file, quicktime_dref_t *dref)
++void quicktime_read_dref(quicktime_t *file, quicktime_dref_t *dref)
+ {
+ int i;
+
+@@ -112,7 +112,7 @@ int quicktime_read_dref(quicktime_t *fil
+ }
+ }
+
+-int quicktime_write_dref(quicktime_t *file, quicktime_dref_t *dref)
++void quicktime_write_dref(quicktime_t *file, quicktime_dref_t *dref)
+ {
+ int i;
+ quicktime_atom_t atom;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_drep.c b/multimedia/libmp4v2/patches/patch-lib_mp4_drep.c
new file mode 100644
index 00000000000..784fcc0cdef
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_drep.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-lib_mp4_drep.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/drep.c.orig 2017-09-25 14:51:52.810957107 +0000
++++ lib/mp4/drep.c
+@@ -22,27 +22,27 @@
+ #include "quicktime.h"
+
+
+-int quicktime_drep_init(quicktime_drep_t *drep)
++void quicktime_drep_init(quicktime_drep_t *drep)
+ {
+ drep->numBytes = 0;
+ }
+
+-int quicktime_drep_delete(quicktime_drep_t *drep)
++void quicktime_drep_delete(quicktime_drep_t *drep)
+ {
+ }
+
+-int quicktime_drep_dump(quicktime_drep_t *drep)
++void quicktime_drep_dump(quicktime_drep_t *drep)
+ {
+ printf(" total repeated bytes\n");
+ printf(" numBytes "U64"\n", drep->numBytes);
+ }
+
+-int quicktime_read_drep(quicktime_t *file, quicktime_drep_t *drep)
++void quicktime_read_drep(quicktime_t *file, quicktime_drep_t *drep)
+ {
+ drep->numBytes = quicktime_read_int64(file);
+ }
+
+-int quicktime_write_drep(quicktime_t *file, quicktime_drep_t *drep)
++void quicktime_write_drep(quicktime_t *file, quicktime_drep_t *drep)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_edts.c b/multimedia/libmp4v2/patches/patch-lib_mp4_edts.c
new file mode 100644
index 00000000000..6307c0a9cbe
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_edts.c
@@ -0,0 +1,46 @@
+$NetBSD: patch-lib_mp4_edts.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/edts.c.orig 2017-09-25 14:51:41.535806446 +0000
++++ lib/mp4/edts.c
+@@ -1,21 +1,21 @@
+ #include "quicktime.h"
+
+-int quicktime_edts_init(quicktime_edts_t *edts)
++void quicktime_edts_init(quicktime_edts_t *edts)
+ {
+ quicktime_elst_init(&(edts->elst));
+ }
+
+-int quicktime_edts_delete(quicktime_edts_t *edts)
++void quicktime_edts_delete(quicktime_edts_t *edts)
+ {
+ quicktime_elst_delete(&(edts->elst));
+ }
+
+-int quicktime_edts_init_table(quicktime_edts_t *edts)
++void quicktime_edts_init_table(quicktime_edts_t *edts)
+ {
+ quicktime_elst_init_all(&(edts->elst));
+ }
+
+-int quicktime_read_edts(quicktime_t *file, quicktime_edts_t *edts, quicktime_atom_t *edts_atom)
++void quicktime_read_edts(quicktime_t *file, quicktime_edts_t *edts, quicktime_atom_t *edts_atom)
+ {
+ quicktime_atom_t leaf_atom;
+
+@@ -29,13 +29,13 @@ int quicktime_read_edts(quicktime_t *fil
+ }while(quicktime_position(file) < edts_atom->end);
+ }
+
+-int quicktime_edts_dump(quicktime_edts_t *edts)
++void quicktime_edts_dump(quicktime_edts_t *edts)
+ {
+ printf(" edit atom (edts)\n");
+ quicktime_elst_dump(&(edts->elst));
+ }
+
+-int quicktime_write_edts(quicktime_t *file, quicktime_edts_t *edts, long duration)
++void quicktime_write_edts(quicktime_t *file, quicktime_edts_t *edts, long duration)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, "edts");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_elst.c b/multimedia/libmp4v2/patches/patch-lib_mp4_elst.c
new file mode 100644
index 00000000000..67d6d63725b
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_elst.c
@@ -0,0 +1,105 @@
+$NetBSD: patch-lib_mp4_elst.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/elst.c.orig 2017-09-25 14:52:32.921623727 +0000
++++ lib/mp4/elst.c
+@@ -1,25 +1,25 @@
+ #include "quicktime.h"
+
+
+-int quicktime_elst_table_init(quicktime_elst_table_t *table)
++void quicktime_elst_table_init(quicktime_elst_table_t *table)
+ {
+ table->duration = 0;
+ table->time = 0;
+ table->rate = 1;
+ }
+
+-int quicktime_elst_table_delete(quicktime_elst_table_t *table)
++void quicktime_elst_table_delete(quicktime_elst_table_t *table)
+ {
+ }
+
+-int quicktime_read_elst_table(quicktime_t *file, quicktime_elst_table_t *table)
++void quicktime_read_elst_table(quicktime_t *file, quicktime_elst_table_t *table)
+ {
+ table->duration = quicktime_read_int32(file);
+ table->time = quicktime_read_int32(file);
+ table->rate = quicktime_read_fixed32(file);
+ }
+
+-int quicktime_write_elst_table(quicktime_t *file, quicktime_elst_table_t *table, long duration)
++void quicktime_write_elst_table(quicktime_t *file, quicktime_elst_table_t *table, long duration)
+ {
+ table->duration = duration;
+ quicktime_write_int32(file, table->duration);
+@@ -27,7 +27,7 @@ int quicktime_write_elst_table(quicktime
+ quicktime_write_fixed32(file, table->rate);
+ }
+
+-int quicktime_elst_table_dump(quicktime_elst_table_t *table)
++void quicktime_elst_table_dump(quicktime_elst_table_t *table)
+ {
+ printf(" edit list table\n");
+ printf(" duration %ld\n", table->duration);
+@@ -35,7 +35,7 @@ int quicktime_elst_table_dump(quicktime_
+ printf(" rate %f\n", table->rate);
+ }
+
+-int quicktime_elst_init(quicktime_elst_t *elst)
++void quicktime_elst_init(quicktime_elst_t *elst)
+ {
+ elst->version = 0;
+ elst->flags = 0;
+@@ -43,7 +43,7 @@ int quicktime_elst_init(quicktime_elst_t
+ elst->table = 0;
+ }
+
+-int quicktime_elst_init_all(quicktime_elst_t *elst)
++void quicktime_elst_init_all(quicktime_elst_t *elst)
+ {
+ if(!elst->total_entries)
+ {
+@@ -53,7 +53,7 @@ int quicktime_elst_init_all(quicktime_el
+ }
+ }
+
+-int quicktime_elst_delete(quicktime_elst_t *elst)
++void quicktime_elst_delete(quicktime_elst_t *elst)
+ {
+ int i;
+ if(elst->total_entries)
+@@ -65,13 +65,13 @@ int quicktime_elst_delete(quicktime_elst
+ elst->total_entries = 0;
+ }
+
+-int quicktime_elst_dump(quicktime_elst_t *elst)
++void quicktime_elst_dump(quicktime_elst_t *elst)
+ {
+ int i;
+ printf(" edit list (elst)\n");
+ printf(" version %d\n", elst->version);
+- printf(" flags %d\n", elst->flags);
+- printf(" total_entries %d\n", elst->total_entries);
++ printf(" flags %ld\n", elst->flags);
++ printf(" total_entries %ld\n", elst->total_entries);
+
+ for(i = 0; i < elst->total_entries; i++)
+ {
+@@ -79,7 +79,7 @@ int quicktime_elst_dump(quicktime_elst_t
+ }
+ }
+
+-int quicktime_read_elst(quicktime_t *file, quicktime_elst_t *elst)
++void quicktime_read_elst(quicktime_t *file, quicktime_elst_t *elst)
+ {
+ int i;
+ quicktime_atom_t leaf_atom;
+@@ -95,7 +95,7 @@ int quicktime_read_elst(quicktime_t *fil
+ }
+ }
+
+-int quicktime_write_elst(quicktime_t *file, quicktime_elst_t *elst, long duration)
++void quicktime_write_elst(quicktime_t *file, quicktime_elst_t *elst, long duration)
+ {
+ quicktime_atom_t atom;
+ int i;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_esds.c b/multimedia/libmp4v2/patches/patch-lib_mp4_esds.c
new file mode 100644
index 00000000000..a32da97d3e4
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_esds.c
@@ -0,0 +1,46 @@
+$NetBSD: patch-lib_mp4_esds.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/esds.c.orig 2017-09-25 14:52:45.360067272 +0000
++++ lib/mp4/esds.c
+@@ -66,7 +66,7 @@ int quicktime_esds_delete(quicktime_esds
+ return 0;
+ }
+
+-int quicktime_esds_dump(quicktime_esds_t *esds)
++void quicktime_esds_dump(quicktime_esds_t *esds)
+ {
+ int i;
+
+@@ -135,12 +135,12 @@ int quicktime_read_esds(quicktime_t *fil
+ return 0;
+ }
+
+-int quicktime_write_esds_common(quicktime_t *file, quicktime_esds_t *esds, int esid, u_int objectType, u_int streamType)
++void quicktime_write_esds_common(quicktime_t *file, quicktime_esds_t *esds, int esid, u_int objectType, u_int streamType)
+ {
+ quicktime_atom_t atom;
+
+ if (!file->use_mp4) {
+- return 0;
++ return;
+ }
+
+ quicktime_atom_write_header(file, &atom, "esds");
+@@ -187,13 +187,13 @@ int quicktime_write_esds_common(quicktim
+ quicktime_atom_write_footer(file, &atom);
+ }
+
+-int quicktime_write_esds_audio(quicktime_t *file, quicktime_esds_t *esds, int esid)
++void quicktime_write_esds_audio(quicktime_t *file, quicktime_esds_t *esds, int esid)
+ {
+- return quicktime_write_esds_common(file, esds, esid, (u_int)0x40, (u_int)0x05);
++ quicktime_write_esds_common(file, esds, esid, (u_int)0x40, (u_int)0x05);
+ }
+
+-int quicktime_write_esds_video(quicktime_t *file, quicktime_esds_t *esds, int esid)
++void quicktime_write_esds_video(quicktime_t *file, quicktime_esds_t *esds, int esid)
+ {
+- return quicktime_write_esds_common(file, esds, esid, (u_int)0x20, (u_int)0x04);
++ quicktime_write_esds_common(file, esds, esid, (u_int)0x20, (u_int)0x04);
+ }
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_funcprotos.h b/multimedia/libmp4v2/patches/patch-lib_mp4_funcprotos.h
index 41cab792b9a..fb97dc778d8 100644
--- a/multimedia/libmp4v2/patches/patch-lib_mp4_funcprotos.h
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_funcprotos.h
@@ -1,10 +1,120 @@
-$NetBSD: patch-lib_mp4_funcprotos.h,v 1.1 2017/05/06 18:12:00 maya Exp $
+$NetBSD: patch-lib_mp4_funcprotos.h,v 1.2 2017/09/25 22:30:06 joerg Exp $
Match new return types.
--- lib/mp4/funcprotos.h.orig 2001-08-01 00:34:00.000000000 +0000
+++ lib/mp4/funcprotos.h
-@@ -67,8 +67,8 @@ int quicktime_trak_init(quicktime_trak_t
+@@ -9,81 +9,81 @@ quicktime_trak_t* quicktime_add_track(qu
+ quicktime_trak_t* quicktime_find_track_by_id(quicktime_moov_t *moov, int trackId);
+
+ /* initializers for every atom */
+-int quicktime_matrix_init(quicktime_matrix_t *matrix);
+-int quicktime_edts_init_table(quicktime_edts_t *edts);
+-int quicktime_edts_init(quicktime_edts_t *edts);
+-int quicktime_elst_init(quicktime_elst_t *elst);
+-int quicktime_elst_init_all(quicktime_elst_t *elst);
+-int quicktime_elst_table_init(quicktime_elst_table_t *table); /* initialize a table */
++void quicktime_matrix_init(quicktime_matrix_t *matrix);
++void quicktime_edts_init_table(quicktime_edts_t *edts);
++void quicktime_edts_init(quicktime_edts_t *edts);
++void quicktime_elst_init(quicktime_elst_t *elst);
++void quicktime_elst_init_all(quicktime_elst_t *elst);
++void quicktime_elst_table_init(quicktime_elst_table_t *table); /* initialize a table */
+ int quicktime_tkhd_init(quicktime_tkhd_t *tkhd);
+-int quicktime_tkhd_init_video(quicktime_t *file, quicktime_tkhd_t *tkhd, int frame_w, int frame_h);
++void quicktime_tkhd_init_video(quicktime_t *file, quicktime_tkhd_t *tkhd, int frame_w, int frame_h);
+ int quicktime_ctab_init(quicktime_ctab_t *ctab);
+-int quicktime_mjqt_init(quicktime_mjqt_t *mjqt);
+-int quicktime_mjht_init(quicktime_mjht_t *mjht);
+-int quicktime_stsd_table_init(quicktime_stsd_table_t *table);
+-int quicktime_stsd_init(quicktime_stsd_t *stsd);
+-int quicktime_stsd_init_table(quicktime_stsd_t *stsd);
+-int quicktime_stsd_init_video(quicktime_t *file, quicktime_stsd_t *stsd, int frame_w, int frame_h, float frame_rate, char *compression);
+-int quicktime_stsd_init_audio(quicktime_t *file, quicktime_stsd_t *stsd, int channels, int sample_rate, int bits, char *compressor);
+-int quicktime_stts_init(quicktime_stts_t *stts);
+-int quicktime_stts_init_table(quicktime_stts_t *stts);
+-int quicktime_stts_init_video(quicktime_t *file, quicktime_stts_t *stts, int time_scale, float frame_rate);
+-int quicktime_stts_init_audio(quicktime_t *file, quicktime_stts_t *stts, int time_scale, int sample_duration);
+-int quicktime_stts_init_hint(quicktime_t *file, quicktime_stts_t *stts, int sample_duration);
+-int quicktime_stss_init(quicktime_stss_t *stss);
+-int quicktime_stss_init_common(quicktime_t *file, quicktime_stss_t *stss);
+-int quicktime_stsc_init(quicktime_stsc_t *stsc);
+-int quicktime_stsc_init_video(quicktime_t *file, quicktime_stsc_t *stsc);
+-int quicktime_stsc_init_audio(quicktime_t *file, quicktime_stsc_t *stsc);
+-int quicktime_stsz_init(quicktime_stsz_t *stsz);
+-int quicktime_stsz_init_video(quicktime_t *file, quicktime_stsz_t *stsz);
+-int quicktime_stsz_init_audio(quicktime_t *file, quicktime_stsz_t *stsz, int sample_size);
+-int quicktime_stco_init(quicktime_stco_t *stco);
+-int quicktime_stco_init_common(quicktime_t *file, quicktime_stco_t *stco);
+-int quicktime_stbl_init(quicktime_stbl_t *tkhd);
+-int quicktime_stbl_init_video(quicktime_t *file, quicktime_stbl_t *stbl, int frame_w, int frame_h, int time_scale, float frame_rate, char *compressor);
+-int quicktime_stbl_init_audio(quicktime_t *file, quicktime_stbl_t *stbl, int channels, int sample_rate, int bits, int sample_size, int time_scale, int sample_duration, char *compressor);
+-int quicktime_stbl_init_hint(quicktime_t *file, quicktime_stbl_t *stbl, quicktime_trak_t *refTrak, int maxPktSize, int timeScale, int sampleDuration);
+-int quicktime_vmhd_init(quicktime_vmhd_t *vmhd);
+-int quicktime_vmhd_init_video(quicktime_t *file, quicktime_vmhd_t *vmhd, int frame_w, int frame_h, float frame_rate);
+-int quicktime_smhd_init(quicktime_smhd_t *smhd);
+-int quicktime_dref_table_init(quicktime_dref_table_t *table);
+-int quicktime_dref_init_all(quicktime_dref_t *dref);
+-int quicktime_dref_init(quicktime_dref_t *dref);
+-int quicktime_dinf_init_all(quicktime_dinf_t *dinf);
+-int quicktime_dinf_init(quicktime_dinf_t *dinf);
+-int quicktime_minf_init(quicktime_minf_t *minf);
+-int quicktime_minf_init_video(quicktime_t *file, quicktime_minf_t *minf, int frame_w, int frame_h, int time_scale, float frame_rate, char *compressor);
+-int quicktime_minf_init_audio(quicktime_t *file, quicktime_minf_t *minf, int channels, int sample_rate, int bits, int sample_size, int time_scale, int sample_duration, char *compressor);
+-int quicktime_minf_init_hint(quicktime_t *file, quicktime_minf_t *minf, quicktime_trak_t *refTrak, int maxPktSize, int timeScale, int sampleDuration);
+-int quicktime_mdhd_init(quicktime_mdhd_t *mdhd);
+-int quicktime_mdhd_init_video(quicktime_t *file, quicktime_mdhd_t *mdhd, int time_scale);
+-int quicktime_mdhd_init_audio(quicktime_t *file, quicktime_mdhd_t *mdhd, int time_scale);
+-int quicktime_mdia_init(quicktime_mdia_t *mdia);
+-int quicktime_mdia_init_video(quicktime_t *file, quicktime_mdia_t *mdia, int frame_w, int frame_h, float frame_rate, int time_scale, char *compressor);
+-int quicktime_mdia_init_audio(quicktime_t *file, quicktime_mdia_t *mdia, int channels, int sample_rate, int bits, int sample_size, int time_scale, int sample_duration, char *compressor);
+-int quicktime_mdia_init_hint(quicktime_t *file, quicktime_mdia_t *mdia, quicktime_trak_t *refTrak, int maxPktSize, int time_scale, int sampleDuration);
++void quicktime_mjqt_init(quicktime_mjqt_t *mjqt);
++void quicktime_mjht_init(quicktime_mjht_t *mjht);
++void quicktime_stsd_table_init(quicktime_stsd_table_t *table);
++void quicktime_stsd_init(quicktime_stsd_t *stsd);
++void quicktime_stsd_init_table(quicktime_stsd_t *stsd);
++void quicktime_stsd_init_video(quicktime_t *file, quicktime_stsd_t *stsd, int frame_w, int frame_h, float frame_rate, char *compression);
++void quicktime_stsd_init_audio(quicktime_t *file, quicktime_stsd_t *stsd, int channels, int sample_rate, int bits, char *compressor);
++void quicktime_stts_init(quicktime_stts_t *stts);
++void quicktime_stts_init_table(quicktime_stts_t *stts);
++void quicktime_stts_init_video(quicktime_t *file, quicktime_stts_t *stts, int time_scale, float frame_rate);
++void quicktime_stts_init_audio(quicktime_t *file, quicktime_stts_t *stts, int time_scale, int sample_duration);
++void quicktime_stts_init_hint(quicktime_t *file, quicktime_stts_t *stts, int sample_duration);
++void quicktime_stss_init(quicktime_stss_t *stss);
++void quicktime_stss_init_common(quicktime_t *file, quicktime_stss_t *stss);
++void quicktime_stsc_init(quicktime_stsc_t *stsc);
++void quicktime_stsc_init_video(quicktime_t *file, quicktime_stsc_t *stsc);
++void quicktime_stsc_init_audio(quicktime_t *file, quicktime_stsc_t *stsc);
++void quicktime_stsz_init(quicktime_stsz_t *stsz);
++void quicktime_stsz_init_video(quicktime_t *file, quicktime_stsz_t *stsz);
++void quicktime_stsz_init_audio(quicktime_t *file, quicktime_stsz_t *stsz, int sample_size);
++void quicktime_stco_init(quicktime_stco_t *stco);
++void quicktime_stco_init_common(quicktime_t *file, quicktime_stco_t *stco);
++void quicktime_stbl_init(quicktime_stbl_t *tkhd);
++void quicktime_stbl_init_video(quicktime_t *file, quicktime_stbl_t *stbl, int frame_w, int frame_h, int time_scale, float frame_rate, char *compressor);
++void quicktime_stbl_init_audio(quicktime_t *file, quicktime_stbl_t *stbl, int channels, int sample_rate, int bits, int sample_size, int time_scale, int sample_duration, char *compressor);
++void quicktime_stbl_init_hint(quicktime_t *file, quicktime_stbl_t *stbl, quicktime_trak_t *refTrak, int maxPktSize, int timeScale, int sampleDuration);
++void quicktime_vmhd_init(quicktime_vmhd_t *vmhd);
++void quicktime_vmhd_init_video(quicktime_t *file, quicktime_vmhd_t *vmhd, int frame_w, int frame_h, float frame_rate);
++void quicktime_smhd_init(quicktime_smhd_t *smhd);
++void quicktime_dref_table_init(quicktime_dref_table_t *table);
++void quicktime_dref_init_all(quicktime_dref_t *dref);
++void quicktime_dref_init(quicktime_dref_t *dref);
++void quicktime_dinf_init_all(quicktime_dinf_t *dinf);
++void quicktime_dinf_init(quicktime_dinf_t *dinf);
++void quicktime_minf_init(quicktime_minf_t *minf);
++void quicktime_minf_init_video(quicktime_t *file, quicktime_minf_t *minf, int frame_w, int frame_h, int time_scale, float frame_rate, char *compressor);
++void quicktime_minf_init_audio(quicktime_t *file, quicktime_minf_t *minf, int channels, int sample_rate, int bits, int sample_size, int time_scale, int sample_duration, char *compressor);
++void quicktime_minf_init_hint(quicktime_t *file, quicktime_minf_t *minf, quicktime_trak_t *refTrak, int maxPktSize, int timeScale, int sampleDuration);
++void quicktime_mdhd_init(quicktime_mdhd_t *mdhd);
++void quicktime_mdhd_init_video(quicktime_t *file, quicktime_mdhd_t *mdhd, int time_scale);
++void quicktime_mdhd_init_audio(quicktime_t *file, quicktime_mdhd_t *mdhd, int time_scale);
++void quicktime_mdia_init(quicktime_mdia_t *mdia);
++void quicktime_mdia_init_video(quicktime_t *file, quicktime_mdia_t *mdia, int frame_w, int frame_h, float frame_rate, int time_scale, char *compressor);
++void quicktime_mdia_init_audio(quicktime_t *file, quicktime_mdia_t *mdia, int channels, int sample_rate, int bits, int sample_size, int time_scale, int sample_duration, char *compressor);
++void quicktime_mdia_init_hint(quicktime_t *file, quicktime_mdia_t *mdia, quicktime_trak_t *refTrak, int maxPktSize, int time_scale, int sampleDuration);
+ int quicktime_trak_init(quicktime_trak_t *trak);
int quicktime_trak_init_video(quicktime_t *file, quicktime_trak_t *trak, int frame_w, int frame_h, float frame_rate, int time_scale, char *compressor);
int quicktime_trak_init_audio(quicktime_t *file, quicktime_trak_t *trak, int channels, int sample_rate, int bits, int sample_size, int time_scale, int sample_duration, char *compressor);
int quicktime_trak_init_hint(quicktime_t *file, quicktime_trak_t *trak, quicktime_trak_t *refTrak, int maxPktSize, int time_scale, int sample_duration);
@@ -15,3 +125,334 @@ Match new return types.
int quicktime_udta_init(quicktime_udta_t *udta);
int quicktime_mvhd_init(quicktime_mvhd_t *mvhd);
int quicktime_moov_init(quicktime_moov_t *moov);
+-int quicktime_mdat_init(quicktime_mdat_t *mdat);
++void quicktime_mdat_init(quicktime_mdat_t *mdat);
+ int quicktime_init(quicktime_t *file);
+-int quicktime_hdlr_init(quicktime_hdlr_t *hdlr);
+-int quicktime_hdlr_init_video(quicktime_hdlr_t *hdlr);
+-int quicktime_hdlr_init_audio(quicktime_hdlr_t *hdlr);
+-int quicktime_hdlr_init_data(quicktime_hdlr_t *hdlr);
++void quicktime_hdlr_init(quicktime_hdlr_t *hdlr);
++void quicktime_hdlr_init_video(quicktime_hdlr_t *hdlr);
++void quicktime_hdlr_init_audio(quicktime_hdlr_t *hdlr);
++void quicktime_hdlr_init_data(quicktime_hdlr_t *hdlr);
+
+ /* utilities for reading data types */
+ int quicktime_read_data(quicktime_t *file, char *data, int size);
+ int quicktime_write_data(quicktime_t *file, char *data, int size);
+-int quicktime_read_pascal(quicktime_t *file, char *data);
+-int quicktime_write_pascal(quicktime_t *file, char *data);
++void quicktime_read_pascal(quicktime_t *file, char *data);
++void quicktime_write_pascal(quicktime_t *file, char *data);
+ float quicktime_read_fixed32(quicktime_t *file);
+ int quicktime_write_fixed32(quicktime_t *file, float number);
+ float quicktime_read_fixed16(quicktime_t *file);
+@@ -98,9 +98,9 @@ int quicktime_read_int16(quicktime_t *fi
+ int quicktime_write_int16(quicktime_t *file, int number);
+ int quicktime_read_char(quicktime_t *file);
+ int quicktime_write_char(quicktime_t *file, char x);
+-int quicktime_read_char32(quicktime_t *file, char *string);
++void quicktime_read_char32(quicktime_t *file, char *string);
+ int quicktime_write_char32(quicktime_t *file, char *string);
+-int quicktime_copy_char32(char *output, char *input);
++void quicktime_copy_char32(char *output, char *input);
+ long quicktime_position(quicktime_t *file);
+ int quicktime_read_mp4_descr_length(quicktime_t *file);
+ int quicktime_write_mp4_descr_length(quicktime_t *file, int length, bool compact);
+@@ -157,4 +157,296 @@ int quicktime_update_tables(quicktime_t
+ long renderingOffset);
+ unsigned long quicktime_current_time();
+
++int quicktime_atom_is(quicktime_atom_t *atom, char *type);
++int quicktime_atom_read_header(quicktime_t *file, quicktime_atom_t *atom);
++int quicktime_atom_skip(quicktime_t *file, quicktime_atom_t *atom);
++int quicktime_chunk_of_sample(long *chunk_sample, long *chunk, quicktime_trak_t *trak, long sample);
++int quicktime_ctab_delete(quicktime_ctab_t *ctab);
++int quicktime_delete_audio_map(quicktime_audio_map_t *atrack);
++int quicktime_delete_trak(quicktime_moov_t *moov, quicktime_trak_t *trak);
++int quicktime_delete_video_map(quicktime_video_map_t *vtrack);
++int quicktime_dump_hint_tlv(u_char* hintBuf);
++int quicktime_esds_delete(quicktime_esds_t *esds);
++int quicktime_esds_get_decoder_config(quicktime_esds_t* esds, u_char** ppBuf, int* pBufSize);
++int quicktime_esds_init(quicktime_esds_t *esds);
++int quicktime_esds_set_decoder_config(quicktime_esds_t* esds, u_char* pBuf, int bufSize);
++int quicktime_get_packet_size(u_char* hintBuf);
++int quicktime_init_audio_map(quicktime_audio_map_t *atrack, quicktime_trak_t *trak);
++int quicktime_init_video_map(quicktime_video_map_t *vtrack, quicktime_trak_t *trak);
++int quicktime_iods_delete(quicktime_iods_t *iods);
++int quicktime_iods_init(quicktime_iods_t *iods);
++int quicktime_match_32(char *input, char *output);
++int quicktime_moov_delete(quicktime_moov_t *moov);
++int quicktime_mvhd_delete(quicktime_mvhd_t *mvhd);
++int quicktime_read_ctab(quicktime_t *file, quicktime_ctab_t *ctab);
++int quicktime_read_esds(quicktime_t *file, quicktime_esds_t *esds);
++int quicktime_read_mdia(quicktime_t *file, quicktime_mdia_t *mdia, quicktime_atom_t *trak_atom);
++int quicktime_read_minf(quicktime_t *file, quicktime_minf_t *minf, quicktime_atom_t *parent_atom);
++int quicktime_read_moov(quicktime_t *file, quicktime_moov_t *moov, quicktime_atom_t *parent_atom);
++int quicktime_read_stbl(quicktime_t *file, quicktime_minf_t *minf, quicktime_stbl_t *stbl, quicktime_atom_t *parent_atom);
++int quicktime_read_trak(quicktime_t *file, quicktime_trak_t *trak, quicktime_atom_t *trak_atom);
++int quicktime_read_udta(quicktime_t *file, quicktime_udta_t *udta, quicktime_atom_t *udta_atom);
++int quicktime_read_udta_string(quicktime_t *file, char **string, int *size);
++int quicktime_set_position(quicktime_t *file, long position);
++int quicktime_set_udta_string(char **string, int *size, char *new_string);
++int quicktime_shift_offsets(quicktime_moov_t *moov, long offset);
++int quicktime_tkhd_delete(quicktime_tkhd_t *tkhd);
++int quicktime_trak_dump(quicktime_trak_t *trak);
++int quicktime_trak_duration(quicktime_trak_t *trak, long *duration, long *timescale);
++int quicktime_trak_fix_counts(quicktime_t *file, quicktime_trak_t *trak);
++int quicktime_trak_shift_offsets(quicktime_trak_t *trak, long offset);
++int quicktime_udta_delete(quicktime_udta_t *udta);
++int quicktime_update_stsc(quicktime_stsc_t *stsc, long chunk, long samples);
++int quicktime_write_trak(quicktime_t *file, quicktime_trak_t *trak, long moov_time_scale);
++int quicktime_write_udta_string(quicktime_t *file, char *string, int size);
++long quicktime_track_end(quicktime_trak_t *trak);
++void quicktime_atom_write_footer(quicktime_t *file, quicktime_atom_t *atom);
++void quicktime_atom_write_header(quicktime_t *file, quicktime_atom_t *atom, char *text);
++void quicktime_ctab_dump(quicktime_ctab_t *ctab);
++void quicktime_ctts_delete(quicktime_ctts_t *ctts);
++void quicktime_ctts_dump(quicktime_ctts_t *ctts);
++void quicktime_ctts_init(quicktime_ctts_t *ctts);
++void quicktime_ctts_init_common(quicktime_t *file, quicktime_ctts_t *ctts);
++void quicktime_dimm_delete(quicktime_dimm_t *dimm);
++void quicktime_dimm_dump(quicktime_dimm_t *dimm);
++void quicktime_dimm_init(quicktime_dimm_t *dimm);
++void quicktime_dinf_delete(quicktime_dinf_t *dinf);
++void quicktime_dinf_dump(quicktime_dinf_t *dinf);
++void quicktime_dmax_delete(quicktime_dmax_t *dmax);
++void quicktime_dmax_dump(quicktime_dmax_t *dmax);
++void quicktime_dmax_init(quicktime_dmax_t *dmax);
++void quicktime_dmed_delete(quicktime_dmed_t *dmed);
++void quicktime_dmed_dump(quicktime_dmed_t *dmed);
++void quicktime_dmed_init(quicktime_dmed_t *dmed);
++void quicktime_dref_delete(quicktime_dref_t *dref);
++void quicktime_dref_dump(quicktime_dref_t *dref);
++void quicktime_drep_delete(quicktime_drep_t *drep);
++void quicktime_drep_dump(quicktime_drep_t *drep);
++void quicktime_drep_init(quicktime_drep_t *drep);
++void quicktime_edts_delete(quicktime_edts_t *edts);
++void quicktime_edts_dump(quicktime_edts_t *edts);
++void quicktime_elst_delete(quicktime_elst_t *elst);
++void quicktime_elst_dump(quicktime_elst_t *elst);
++void quicktime_esds_dump(quicktime_esds_t *esds);
++void quicktime_gmhd_delete(quicktime_gmhd_t *gmhd);
++void quicktime_gmhd_dump(quicktime_gmhd_t *gmhd);
++void quicktime_gmhd_init(quicktime_gmhd_t *gmhd);
++void quicktime_gmin_delete(quicktime_gmin_t *gmin);
++void quicktime_gmin_dump(quicktime_gmin_t *gmin);
++void quicktime_gmin_init(quicktime_gmin_t *gmin);
++void quicktime_hdlr_delete(quicktime_hdlr_t *hdlr);
++void quicktime_hdlr_dump(quicktime_hdlr_t *hdlr);
++void quicktime_hdlr_init_hint(quicktime_hdlr_t *hdlr);
++void quicktime_hinf_delete(quicktime_hinf_t *hinf);
++void quicktime_hinf_dump(quicktime_hinf_t *hinf);
++void quicktime_hinf_init(quicktime_hinf_t *hinf);
++void quicktime_hint_delete(quicktime_hint_t *hint);
++void quicktime_hint_dump(quicktime_hint_t *hint);
++void quicktime_hint_hnti_delete(quicktime_hint_hnti_t *hnti);
++void quicktime_hint_hnti_dump(quicktime_hint_hnti_t *hnti);
++void quicktime_hint_hnti_init(quicktime_hint_hnti_t *hnti);
++void quicktime_hint_init(quicktime_hint_t *hint);
++void quicktime_hint_set(quicktime_hint_t *hint, quicktime_trak_t *refTrak);
++void quicktime_hint_udta_delete(quicktime_hint_udta_t *hint_udta);
++void quicktime_hint_udta_dump(quicktime_hint_udta_t *hint_udta);
++void quicktime_hint_udta_init(quicktime_hint_udta_t *hint_udta);
++void quicktime_hmhd_delete(quicktime_hmhd_t *hmhd);
++void quicktime_hmhd_dump(quicktime_hmhd_t *hmhd);
++void quicktime_hmhd_init(quicktime_hmhd_t *hmhd);
++void quicktime_hnti_delete(quicktime_hnti_t *hnti);
++void quicktime_hnti_dump(quicktime_hnti_t *hnti);
++void quicktime_hnti_init(quicktime_hnti_t *hnti);
++void quicktime_iods_dump(quicktime_iods_t *iods);
++void quicktime_iods_set_audio_profile(quicktime_iods_t* iods, int id);
++void quicktime_iods_set_video_profile(quicktime_iods_t* iods, int id);
++void quicktime_matrix_dump(quicktime_matrix_t *matrix);
++void quicktime_maxr_delete(quicktime_maxr_t *maxr);
++void quicktime_maxr_delete(quicktime_maxr_t *maxr);
++void quicktime_maxr_dump(quicktime_maxr_t *maxr);
++void quicktime_maxr_init(quicktime_maxr_t *maxr);
++void quicktime_mdat_delete(quicktime_mdat_t *mdat);
++void quicktime_mdhd_delete(quicktime_mdhd_t *mdhd);
++void quicktime_mdhd_dump(quicktime_mdhd_t *mdhd);
++void quicktime_mdhd_init_hint(quicktime_t *file, quicktime_mdhd_t *mdhd, quicktime_trak_t *refTrak, int time_scale);
++void quicktime_mdia_delete(quicktime_mdia_t *mdia);
++void quicktime_mdia_dump(quicktime_mdia_t *mdia);
++void quicktime_minf_delete(quicktime_minf_t *minf);
++void quicktime_minf_dump(quicktime_minf_t *minf);
++void quicktime_mjht_delete(quicktime_mjht_t *mjht);
++void quicktime_mjht_dump(quicktime_mjht_t *mjht);
++void quicktime_mjqt_delete(quicktime_mjqt_t *mjqt);
++void quicktime_mjqt_dump(quicktime_mjqt_t *mjqt);
++void quicktime_moov_dump(quicktime_moov_t *moov);
++void quicktime_mvhd_dump(quicktime_mvhd_t *mvhd);
++void quicktime_nump_delete(quicktime_nump_t *nump);
++void quicktime_nump_dump(quicktime_nump_t *nump);
++void quicktime_nump_init(quicktime_nump_t *nump);
++void quicktime_payt_delete(quicktime_payt_t *payt);
++void quicktime_payt_dump(quicktime_payt_t *payt);
++void quicktime_payt_init(quicktime_payt_t *payt);
++void quicktime_pmax_delete(quicktime_pmax_t *pmax);
++void quicktime_pmax_dump(quicktime_pmax_t *pmax);
++void quicktime_pmax_init(quicktime_pmax_t *pmax);
++void quicktime_print_chars(char *desc, char *input, int len);
++void quicktime_read_ctts(quicktime_t *file, quicktime_ctts_t *ctts);
++void quicktime_read_dimm(quicktime_t *file, quicktime_dimm_t *dimm);
++void quicktime_read_dinf(quicktime_t *file, quicktime_dinf_t *dinf, quicktime_atom_t *dinf_atom);
++void quicktime_read_dmax(quicktime_t *file, quicktime_dmax_t *dmax);
++void quicktime_read_dmed(quicktime_t *file, quicktime_dmed_t *dmed);
++void quicktime_read_dref(quicktime_t *file, quicktime_dref_t *dref);
++void quicktime_read_drep(quicktime_t *file, quicktime_drep_t *drep);
++void quicktime_read_edts(quicktime_t *file, quicktime_edts_t *edts, quicktime_atom_t *edts_atom);
++void quicktime_read_elst(quicktime_t *file, quicktime_elst_t *elst);
++void quicktime_read_gmhd(quicktime_t *file, quicktime_gmhd_t *gmhd, quicktime_atom_t *parent_atom);
++void quicktime_read_gmin(quicktime_t *file, quicktime_gmin_t *gmin);
++void quicktime_read_hdlr(quicktime_t *file, quicktime_hdlr_t *hdlr);
++void quicktime_read_hinf(quicktime_t *file, quicktime_hinf_t *hinf, quicktime_atom_t *parent_atom);
++void quicktime_read_hint(quicktime_t *file, quicktime_hint_t *hint, quicktime_atom_t *parent_atom);
++void quicktime_read_hint_hnti(quicktime_t *file, quicktime_hint_hnti_t *hnti, quicktime_atom_t *parent_atom);
++void quicktime_read_hint_udta(quicktime_t *file, quicktime_hint_udta_t *hint_udta, quicktime_atom_t *parent_atom);
++void quicktime_read_hmhd(quicktime_t *file, quicktime_hmhd_t *hmhd);
++void quicktime_read_hnti(quicktime_t *file, quicktime_hnti_t *hnti, quicktime_atom_t *parent_atom);
++void quicktime_read_iods(quicktime_t *file, quicktime_iods_t *iods);
++void quicktime_read_matrix(quicktime_t *file, quicktime_matrix_t *matrix);
++void quicktime_read_maxr(quicktime_t *file, quicktime_maxr_t *maxr);
++void quicktime_read_mdat(quicktime_t *file, quicktime_mdat_t *mdat, quicktime_atom_t *parent_atom);
++void quicktime_read_mdhd(quicktime_t *file, quicktime_mdhd_t *mdhd);
++void quicktime_read_mvhd(quicktime_t *file, quicktime_mvhd_t *mvhd);
++void quicktime_read_nump(quicktime_t *file, quicktime_nump_t *nump);
++void quicktime_read_payt(quicktime_t *file, quicktime_payt_t *payt);
++void quicktime_read_pmax(quicktime_t *file, quicktime_pmax_t *pmax);
++void quicktime_read_rtp(quicktime_t *file, quicktime_rtp_t *rtp, quicktime_atom_t* rtp_atom);
++void quicktime_read_sdp(quicktime_t *file, quicktime_sdp_t *sdp, quicktime_atom_t* sdp_atom);
++void quicktime_read_smhd(quicktime_t *file, quicktime_smhd_t *smhd);
++void quicktime_read_stco(quicktime_t *file, quicktime_stco_t *stco);
++void quicktime_read_stsc(quicktime_t *file, quicktime_stsc_t *stsc);
++void quicktime_read_stsd(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_t *stsd);
++void quicktime_read_stsd_audio(quicktime_t *file, quicktime_stsd_table_t *table, quicktime_atom_t *parent_atom);
++void quicktime_read_stsd_hint(quicktime_t *file, quicktime_stsd_table_t *table, quicktime_atom_t *parent_atom);
++void quicktime_read_stsd_table(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_table_t *table);
++void quicktime_read_stsd_video(quicktime_t *file, quicktime_stsd_table_t *table, quicktime_atom_t *parent_atom);
++void quicktime_read_stss(quicktime_t *file, quicktime_stss_t *stss);
++void quicktime_read_stsz(quicktime_t *file, quicktime_stsz_t *stsz);
++void quicktime_read_stts(quicktime_t *file, quicktime_stts_t *stts);
++void quicktime_read_tims(quicktime_t *file, quicktime_tims_t *tims);
++void quicktime_read_tkhd(quicktime_t *file, quicktime_tkhd_t *tkhd);
++void quicktime_read_tmax(quicktime_t *file, quicktime_tmax_t *tmax);
++void quicktime_read_tmin(quicktime_t *file, quicktime_tmin_t *tmin);
++void quicktime_read_tpyl(quicktime_t *file, quicktime_tpyl_t *tpyl);
++void quicktime_read_tref(quicktime_t *file, quicktime_tref_t *tref, quicktime_atom_t *parent_atom);
++void quicktime_read_trpy(quicktime_t *file, quicktime_trpy_t *trpy);
++void quicktime_read_vmhd(quicktime_t *file, quicktime_vmhd_t *vmhd);
++void quicktime_rtp_delete(quicktime_rtp_t *rtp);
++void quicktime_rtp_dump(quicktime_rtp_t *rtp);
++void quicktime_rtp_init(quicktime_rtp_t *rtp);
++void quicktime_rtp_set(quicktime_rtp_t *rtp, char *string);
++void quicktime_sdp_append(quicktime_sdp_t *sdp, char *appendString);
++void quicktime_sdp_delete(quicktime_sdp_t *sdp);
++void quicktime_sdp_dump(quicktime_sdp_t *sdp);
++void quicktime_sdp_init(quicktime_sdp_t *sdp);
++void quicktime_sdp_set(quicktime_sdp_t *sdp, char *string);
++void quicktime_smhd_delete(quicktime_smhd_t *smhd);
++void quicktime_smhd_dump(quicktime_smhd_t *smhd);
++void quicktime_stbl_delete(quicktime_stbl_t *stbl);
++void quicktime_stbl_dump(void *minf_ptr, quicktime_stbl_t *stbl);
++void quicktime_stco_delete(quicktime_stco_t *stco);
++void quicktime_stco_dump(quicktime_stco_t *stco);
++void quicktime_stsc_delete(quicktime_stsc_t *stsc);
++void quicktime_stsc_dump(quicktime_stsc_t *stsc);
++void quicktime_stsd_audio_dump(quicktime_stsd_table_t *table);
++void quicktime_stsd_delete(quicktime_stsd_t *stsd);
++void quicktime_stsd_dump(void *minf_ptr, quicktime_stsd_t *stsd);
++void quicktime_stsd_hint_dump(quicktime_stsd_table_t *table);
++void quicktime_stsd_init_hint(quicktime_t *file, quicktime_stsd_t *stsd, int maxPktSize, int timeScale);
++void quicktime_stsd_table_delete(quicktime_stsd_table_t *table);
++void quicktime_stsd_table_dump(void *minf_ptr, quicktime_stsd_table_t *table);
++void quicktime_stsd_video_dump(quicktime_stsd_table_t *table);
++void quicktime_stss_delete(quicktime_stss_t *stss);
++void quicktime_stss_dump(quicktime_stss_t *stss);
++void quicktime_stsz_delete(quicktime_stsz_t *stsz);
++void quicktime_stsz_dump(quicktime_stsz_t *stsz);
++void quicktime_stts_delete(quicktime_stts_t *stts);
++void quicktime_stts_dump(quicktime_stts_t *stts);
++void quicktime_tims_init(quicktime_tims_t *tims);
++void quicktime_tkhd_dump(quicktime_tkhd_t *tkhd);
++void quicktime_tkhd_init_hint(quicktime_t *file, quicktime_tkhd_t *tkhd);
++void quicktime_tmax_delete(quicktime_tmax_t *tmax);
++void quicktime_tmax_dump(quicktime_tmax_t *tmax);
++void quicktime_tmax_init(quicktime_tmax_t *tmax);
++void quicktime_tmin_delete(quicktime_tmin_t *tmin);
++void quicktime_tmin_dump(quicktime_tmin_t *tmin);
++void quicktime_tmin_init(quicktime_tmin_t *tmin);
++void quicktime_tpyl_delete(quicktime_tpyl_t *tpyl);
++void quicktime_tpyl_dump(quicktime_tpyl_t *tpyl);
++void quicktime_tpyl_init(quicktime_tpyl_t *tpyl);
++void quicktime_tref_dump(quicktime_tref_t *tref);
++void quicktime_trpy_delete(quicktime_trpy_t *trpy);
++void quicktime_trpy_dump(quicktime_trpy_t *trpy);
++void quicktime_trpy_init(quicktime_trpy_t *trpy);
++void quicktime_udta_dump(quicktime_udta_t *udta);
++void quicktime_update_ctts(quicktime_ctts_t *ctts, long sample_offset);
++void quicktime_update_durations(quicktime_moov_t *moov);
++void quicktime_update_stco(quicktime_stco_t *stco, long chunk, long offset);
++void quicktime_update_stss(quicktime_stss_t *stss, long sample);
++void quicktime_update_stsz(quicktime_stsz_t *stsz, long sample, long sample_size);
++void quicktime_update_stts(quicktime_stts_t *stts, long sample_duration);
++void quicktime_vmhd_delete(quicktime_vmhd_t *vmhd);
++void quicktime_vmhd_dump(quicktime_vmhd_t *vmhd);
++void quicktime_write_ctts(quicktime_t *file, quicktime_ctts_t *ctts);
++void quicktime_write_dimm(quicktime_t *file, quicktime_dimm_t *dimm);
++void quicktime_write_dinf(quicktime_t *file, quicktime_dinf_t *dinf);
++void quicktime_write_dmax(quicktime_t *file, quicktime_dmax_t *dmax);
++void quicktime_write_dmed(quicktime_t *file, quicktime_dmed_t *dmed);
++void quicktime_write_dref(quicktime_t *file, quicktime_dref_t *dref);
++void quicktime_write_drep(quicktime_t *file, quicktime_drep_t *drep);
++void quicktime_write_edts(quicktime_t *file, quicktime_edts_t *edts, long duration);
++void quicktime_write_elst(quicktime_t *file, quicktime_elst_t *elst, long duration);
++void quicktime_write_esds_audio(quicktime_t *file, quicktime_esds_t *esds, int esid);
++void quicktime_write_esds_video(quicktime_t *file, quicktime_esds_t *esds, int esid);
++void quicktime_write_gmhd(quicktime_t *file, quicktime_gmhd_t *gmhd);
++void quicktime_write_gmin(quicktime_t *file, quicktime_gmin_t *gmin);
++void quicktime_write_hdlr(quicktime_t *file, quicktime_hdlr_t *hdlr);
++void quicktime_write_hinf(quicktime_t *file, quicktime_hinf_t *hinf);
++void quicktime_write_hint(quicktime_t *file, quicktime_hint_t *hint);
++void quicktime_write_hint_hnti(quicktime_t *file, quicktime_hint_hnti_t *hnti);
++void quicktime_write_hint_udta(quicktime_t *file, quicktime_hint_udta_t *hint_udta);
++void quicktime_write_hmhd(quicktime_t *file, quicktime_hmhd_t *hmhd);
++void quicktime_write_hnti(quicktime_t *file, quicktime_hnti_t *hnti);
++void quicktime_write_iods(quicktime_t *file, quicktime_iods_t *iods);
++void quicktime_write_matrix(quicktime_t *file, quicktime_matrix_t *matrix);
++void quicktime_write_maxr(quicktime_t *file, quicktime_maxr_t *maxr);
++void quicktime_write_mdat(quicktime_t *file, quicktime_mdat_t *mdat);
++void quicktime_write_mdhd(quicktime_t *file, quicktime_mdhd_t *mdhd);
++void quicktime_write_mdia(quicktime_t *file, quicktime_mdia_t *mdia);
++void quicktime_write_minf(quicktime_t *file, quicktime_minf_t *minf);
++void quicktime_write_moov(quicktime_t *file, quicktime_moov_t *moov);
++void quicktime_write_moov(quicktime_t *file, quicktime_moov_t *moov);
++void quicktime_write_mvhd(quicktime_t *file, quicktime_mvhd_t *mvhd);
++void quicktime_write_nump(quicktime_t *file, quicktime_nump_t *nump);
++void quicktime_write_payt(quicktime_t *file, quicktime_payt_t *payt);
++void quicktime_write_pmax(quicktime_t *file, quicktime_pmax_t *pmax);
++void quicktime_write_rtp(quicktime_t *file, quicktime_rtp_t *rtp);
++void quicktime_write_sdp(quicktime_t *file, quicktime_sdp_t *sdp);
++void quicktime_write_smhd(quicktime_t *file, quicktime_smhd_t *smhd);
++void quicktime_write_stbl(quicktime_t *file, quicktime_minf_t *minf, quicktime_stbl_t *stbl);
++void quicktime_write_stco(quicktime_t *file, quicktime_stco_t *stco);
++void quicktime_write_stsc(quicktime_t *file, quicktime_stsc_t *stsc);
++void quicktime_write_stsd(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_t *stsd);
++void quicktime_write_stsd_audio(quicktime_t *file, quicktime_stsd_table_t *table);
++void quicktime_write_stsd_hint(quicktime_t *file, quicktime_stsd_table_t *table);
++void quicktime_write_stsd_table(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_table_t *table);
++void quicktime_write_stsd_video(quicktime_t *file, quicktime_stsd_table_t *table);
++void quicktime_write_stss(quicktime_t *file, quicktime_stss_t *stss);
++void quicktime_write_stsz(quicktime_t *file, quicktime_stsz_t *stsz);
++void quicktime_write_stts(quicktime_t *file, quicktime_stts_t *stts);
++void quicktime_write_tims(quicktime_t *file, quicktime_tims_t *tims);
++void quicktime_write_tkhd(quicktime_t *file, quicktime_tkhd_t *tkhd);
++void quicktime_write_tmax(quicktime_t *file, quicktime_tmax_t *tmax);
++void quicktime_write_tmin(quicktime_t *file, quicktime_tmin_t *tmin);
++void quicktime_write_tpyl(quicktime_t *file, quicktime_tpyl_t *tpyl);
++void quicktime_write_tref(quicktime_t *file, quicktime_tref_t *tref);
++void quicktime_write_trpy(quicktime_t *file, quicktime_trpy_t *trpy);
++void quicktime_write_udta(quicktime_t *file, quicktime_udta_t *udta);
++void quicktime_write_vmhd(quicktime_t *file, quicktime_vmhd_t *vmhd);
++
+ #endif
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_gmhd.c b/multimedia/libmp4v2/patches/patch-lib_mp4_gmhd.c
new file mode 100644
index 00000000000..d0bbf9dcdd2
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_gmhd.c
@@ -0,0 +1,41 @@
+$NetBSD: patch-lib_mp4_gmhd.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/gmhd.c.orig 2017-09-25 14:53:02.313176484 +0000
++++ lib/mp4/gmhd.c
+@@ -3,23 +3,23 @@
+
+
+
+-int quicktime_gmhd_init(quicktime_gmhd_t *gmhd)
++void quicktime_gmhd_init(quicktime_gmhd_t *gmhd)
+ {
+ quicktime_gmin_init(&(gmhd->gmin));
+ }
+
+-int quicktime_gmhd_delete(quicktime_gmhd_t *gmhd)
++void quicktime_gmhd_delete(quicktime_gmhd_t *gmhd)
+ {
+ quicktime_gmin_delete(&(gmhd->gmin));
+ }
+
+-int quicktime_gmhd_dump(quicktime_gmhd_t *gmhd)
++void quicktime_gmhd_dump(quicktime_gmhd_t *gmhd)
+ {
+ printf(" generic media header\n");
+ quicktime_gmin_dump(&gmhd->gmin);
+ }
+
+-int quicktime_read_gmhd(quicktime_t *file, quicktime_gmhd_t *gmhd, quicktime_atom_t *parent_atom)
++void quicktime_read_gmhd(quicktime_t *file, quicktime_gmhd_t *gmhd, quicktime_atom_t *parent_atom)
+ {
+ quicktime_atom_t leaf_atom;
+
+@@ -34,7 +34,7 @@ int quicktime_read_gmhd(quicktime_t *fil
+ } while (quicktime_position(file) < parent_atom->end);
+ }
+
+-int quicktime_write_gmhd(quicktime_t *file, quicktime_gmhd_t *gmhd)
++void quicktime_write_gmhd(quicktime_t *file, quicktime_gmhd_t *gmhd)
+ {
+
+ quicktime_atom_t atom;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_gmin.c b/multimedia/libmp4v2/patches/patch-lib_mp4_gmin.c
new file mode 100644
index 00000000000..e9343e0081a
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_gmin.c
@@ -0,0 +1,49 @@
+$NetBSD: patch-lib_mp4_gmin.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/gmin.c.orig 2017-09-25 14:53:09.783132407 +0000
++++ lib/mp4/gmin.c
+@@ -3,7 +3,7 @@
+
+
+
+-int quicktime_gmin_init(quicktime_gmin_t *gmin)
++void quicktime_gmin_init(quicktime_gmin_t *gmin)
+ {
+ gmin->version = 0;
+ gmin->flags = 0;
+@@ -15,22 +15,22 @@ int quicktime_gmin_init(quicktime_gmin_t
+ gmin->reserved = 0;
+ }
+
+-int quicktime_gmin_delete(quicktime_gmin_t *gmin)
++void quicktime_gmin_delete(quicktime_gmin_t *gmin)
+ {
+ }
+
+-int quicktime_gmin_dump(quicktime_gmin_t *gmin)
++void quicktime_gmin_dump(quicktime_gmin_t *gmin)
+ {
+ printf(" generic media info\n");
+ printf(" version %d\n", gmin->version);
+- printf(" flags %d\n", gmin->flags);
++ printf(" flags %ld\n", gmin->flags);
+ printf(" graphics_mode %d\n", gmin->graphics_mode);
+ printf(" opcolor %d %d %d\n", gmin->opcolor[0], gmin->opcolor[1], gmin->opcolor[2]);
+ printf(" balance %d\n", gmin->balance);
+ printf(" reserved %d\n", gmin->reserved);
+ }
+
+-int quicktime_read_gmin(quicktime_t *file, quicktime_gmin_t *gmin)
++void quicktime_read_gmin(quicktime_t *file, quicktime_gmin_t *gmin)
+ {
+ int i;
+
+@@ -43,7 +43,7 @@ int quicktime_read_gmin(quicktime_t *fil
+ gmin->reserved = quicktime_read_int16(file);
+ }
+
+-int quicktime_write_gmin(quicktime_t *file, quicktime_gmin_t *gmin)
++void quicktime_write_gmin(quicktime_t *file, quicktime_gmin_t *gmin)
+ {
+ int i;
+ quicktime_atom_t atom;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_hdlr.c b/multimedia/libmp4v2/patches/patch-lib_mp4_hdlr.c
new file mode 100644
index 00000000000..1078db96f0c
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_hdlr.c
@@ -0,0 +1,84 @@
+$NetBSD: patch-lib_mp4_hdlr.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/hdlr.c.orig 2017-09-25 14:53:18.531936562 +0000
++++ lib/mp4/hdlr.c
+@@ -2,7 +2,7 @@
+
+
+
+-int quicktime_hdlr_init(quicktime_hdlr_t *hdlr)
++void quicktime_hdlr_init(quicktime_hdlr_t *hdlr)
+ {
+ hdlr->version = 0;
+ hdlr->flags = 0;
+@@ -20,7 +20,7 @@ int quicktime_hdlr_init(quicktime_hdlr_t
+ strcpy(hdlr->component_name, "Linux Media Handler");
+ }
+
+-int quicktime_hdlr_init_video(quicktime_hdlr_t *hdlr)
++void quicktime_hdlr_init_video(quicktime_hdlr_t *hdlr)
+ {
+ hdlr->component_subtype[0] = 'v';
+ hdlr->component_subtype[1] = 'i';
+@@ -29,7 +29,7 @@ int quicktime_hdlr_init_video(quicktime_
+ strcpy(hdlr->component_name, "Linux Video Media Handler");
+ }
+
+-int quicktime_hdlr_init_audio(quicktime_hdlr_t *hdlr)
++void quicktime_hdlr_init_audio(quicktime_hdlr_t *hdlr)
+ {
+ hdlr->component_subtype[0] = 's';
+ hdlr->component_subtype[1] = 'o';
+@@ -38,7 +38,7 @@ int quicktime_hdlr_init_audio(quicktime_
+ strcpy(hdlr->component_name, "Linux Sound Media Handler");
+ }
+
+-int quicktime_hdlr_init_hint(quicktime_hdlr_t *hdlr)
++void quicktime_hdlr_init_hint(quicktime_hdlr_t *hdlr)
+ {
+ hdlr->component_subtype[0] = 'h';
+ hdlr->component_subtype[1] = 'i';
+@@ -47,7 +47,7 @@ int quicktime_hdlr_init_hint(quicktime_h
+ strcpy(hdlr->component_name, "Linux Hint Media Handler");
+ }
+
+-int quicktime_hdlr_init_data(quicktime_hdlr_t *hdlr)
++void quicktime_hdlr_init_data(quicktime_hdlr_t *hdlr)
+ {
+ hdlr->component_type[0] = 'd';
+ hdlr->component_type[1] = 'h';
+@@ -60,21 +60,21 @@ int quicktime_hdlr_init_data(quicktime_h
+ strcpy(hdlr->component_name, "Linux Alias Data Handler");
+ }
+
+-int quicktime_hdlr_delete(quicktime_hdlr_t *hdlr)
++void quicktime_hdlr_delete(quicktime_hdlr_t *hdlr)
+ {
+ }
+
+-int quicktime_hdlr_dump(quicktime_hdlr_t *hdlr)
++void quicktime_hdlr_dump(quicktime_hdlr_t *hdlr)
+ {
+ printf(" handler reference (hdlr)\n");
+ printf(" version %d\n", hdlr->version);
+- printf(" flags %d\n", hdlr->flags);
++ printf(" flags %ld\n", hdlr->flags);
+ printf(" component_type %c%c%c%c\n", hdlr->component_type[0], hdlr->component_type[1], hdlr->component_type[2], hdlr->component_type[3]);
+ printf(" component_subtype %c%c%c%c\n", hdlr->component_subtype[0], hdlr->component_subtype[1], hdlr->component_subtype[2], hdlr->component_subtype[3]);
+ printf(" component_name %s\n", hdlr->component_name);
+ }
+
+-int quicktime_read_hdlr(quicktime_t *file, quicktime_hdlr_t *hdlr)
++void quicktime_read_hdlr(quicktime_t *file, quicktime_hdlr_t *hdlr)
+ {
+ hdlr->version = quicktime_read_char(file);
+ hdlr->flags = quicktime_read_int24(file);
+@@ -90,7 +90,7 @@ int quicktime_read_hdlr(quicktime_t *fil
+ }
+ }
+
+-int quicktime_write_hdlr(quicktime_t *file, quicktime_hdlr_t *hdlr)
++void quicktime_write_hdlr(quicktime_t *file, quicktime_hdlr_t *hdlr)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, "hdlr");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_hinf.c b/multimedia/libmp4v2/patches/patch-lib_mp4_hinf.c
new file mode 100644
index 00000000000..d8fd7379bea
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_hinf.c
@@ -0,0 +1,57 @@
+$NetBSD: patch-lib_mp4_hinf.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/hinf.c.orig 2017-09-25 14:53:28.522486157 +0000
++++ lib/mp4/hinf.c
+@@ -22,7 +22,7 @@
+ #include "quicktime.h"
+
+
+-int quicktime_hinf_init(quicktime_hinf_t *hinf)
++void quicktime_hinf_init(quicktime_hinf_t *hinf)
+ {
+ quicktime_trpy_init(&(hinf->trpy));
+ quicktime_nump_init(&(hinf->nump));
+@@ -38,7 +38,7 @@ int quicktime_hinf_init(quicktime_hinf_t
+ quicktime_payt_init(&(hinf->payt));
+ }
+
+-int quicktime_hinf_delete(quicktime_hinf_t *hinf)
++void quicktime_hinf_delete(quicktime_hinf_t *hinf)
+ {
+ quicktime_trpy_delete(&(hinf->trpy));
+ quicktime_nump_delete(&(hinf->nump));
+@@ -54,7 +54,7 @@ int quicktime_hinf_delete(quicktime_hinf
+ quicktime_payt_delete(&(hinf->payt));
+ }
+
+-int quicktime_hinf_dump(quicktime_hinf_t *hinf)
++void quicktime_hinf_dump(quicktime_hinf_t *hinf)
+ {
+ printf(" hinf\n");
+ quicktime_trpy_dump(&(hinf->trpy));
+@@ -71,7 +71,7 @@ int quicktime_hinf_dump(quicktime_hinf_t
+ quicktime_payt_dump(&(hinf->payt));
+ }
+
+-int quicktime_read_hinf(quicktime_t *file, quicktime_hinf_t *hinf, quicktime_atom_t *parent_atom)
++void quicktime_read_hinf(quicktime_t *file, quicktime_hinf_t *hinf, quicktime_atom_t *parent_atom)
+ {
+ quicktime_atom_t leaf_atom;
+
+@@ -101,14 +101,14 @@ int quicktime_read_hinf(quicktime_t *fil
+ } else if (quicktime_atom_is(&leaf_atom, "dmax")) {
+ quicktime_read_dmax(file, &(hinf->dmax));
+ } else if (quicktime_atom_is(&leaf_atom, "payt")) {
+- quicktime_read_payt(file, &(hinf->payt), &leaf_atom);
++ quicktime_read_payt(file, &(hinf->payt));
+ } else {
+ quicktime_atom_skip(file, &leaf_atom);
+ }
+ } while (quicktime_position(file) < parent_atom->end);
+ }
+
+-int quicktime_write_hinf(quicktime_t *file, quicktime_hinf_t *hinf)
++void quicktime_write_hinf(quicktime_t *file, quicktime_hinf_t *hinf)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_hint.c b/multimedia/libmp4v2/patches/patch-lib_mp4_hint.c
new file mode 100644
index 00000000000..7cfcdd12307
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_hint.c
@@ -0,0 +1,59 @@
+$NetBSD: patch-lib_mp4_hint.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/hint.c.orig 2017-09-25 14:53:35.749860457 +0000
++++ lib/mp4/hint.c
+@@ -22,25 +22,25 @@
+ #include "quicktime.h"
+
+
+-int quicktime_hint_init(quicktime_hint_t *hint)
++void quicktime_hint_init(quicktime_hint_t *hint)
+ {
+ hint->numTracks = 0;
+ hint->trackIds[0] = -1;
+ hint->traks[0] = NULL;
+ }
+
+-int quicktime_hint_set(quicktime_hint_t *hint, quicktime_trak_t *refTrak)
++void quicktime_hint_set(quicktime_hint_t *hint, quicktime_trak_t *refTrak)
+ {
+ hint->traks[hint->numTracks] = refTrak;
+ hint->trackIds[hint->numTracks] = refTrak->tkhd.track_id;
+ hint->numTracks++;
+ }
+
+-int quicktime_hint_delete(quicktime_hint_t *hint)
++void quicktime_hint_delete(quicktime_hint_t *hint)
+ {
+ }
+
+-int quicktime_read_hint(quicktime_t *file, quicktime_hint_t *hint, quicktime_atom_t *parent_atom)
++void quicktime_read_hint(quicktime_t *file, quicktime_hint_t *hint, quicktime_atom_t *parent_atom)
+ {
+ quicktime_trak_t* refTrak = NULL;
+ int i;
+@@ -52,7 +52,7 @@ int quicktime_read_hint(quicktime_t *fil
+ }
+ }
+
+-int quicktime_write_hint(quicktime_t *file, quicktime_hint_t *hint)
++void quicktime_write_hint(quicktime_t *file, quicktime_hint_t *hint)
+ {
+ quicktime_atom_t atom;
+ int i;
+@@ -66,13 +66,13 @@ int quicktime_write_hint(quicktime_t *fi
+ quicktime_atom_write_footer(file, &atom);
+ }
+
+-int quicktime_hint_dump(quicktime_hint_t *hint)
++void quicktime_hint_dump(quicktime_hint_t *hint)
+ {
+ int i;
+
+ printf(" hint\n");
+ for (i = 0; i < hint->numTracks; i++) {
+- printf(" track %d\n", hint->trackIds[i]);
++ printf(" track %ld\n", hint->trackIds[i]);
+ }
+ }
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_hmhd.c b/multimedia/libmp4v2/patches/patch-lib_mp4_hmhd.c
new file mode 100644
index 00000000000..d97fff2372e
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_hmhd.c
@@ -0,0 +1,53 @@
+$NetBSD: patch-lib_mp4_hmhd.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/hmhd.c.orig 2017-09-25 14:53:53.102877442 +0000
++++ lib/mp4/hmhd.c
+@@ -22,7 +22,7 @@
+ #include "quicktime.h"
+
+
+-int quicktime_hmhd_init(quicktime_hmhd_t *hmhd)
++void quicktime_hmhd_init(quicktime_hmhd_t *hmhd)
+ {
+ hmhd->version = 0;
+ hmhd->flags = 0;
+@@ -33,23 +33,23 @@ int quicktime_hmhd_init(quicktime_hmhd_t
+ hmhd->slidingavgbitrate = 0;
+ }
+
+-int quicktime_hmhd_delete(quicktime_hmhd_t *hmhd)
++void quicktime_hmhd_delete(quicktime_hmhd_t *hmhd)
+ {
+ }
+
+-int quicktime_hmhd_dump(quicktime_hmhd_t *hmhd)
++void quicktime_hmhd_dump(quicktime_hmhd_t *hmhd)
+ {
+ printf(" hint media header\n");
+ printf(" version %d\n", hmhd->version);
+- printf(" flags %d\n", hmhd->flags);
++ printf(" flags %ld\n", hmhd->flags);
+ printf(" maxPDUsize %d\n", hmhd->maxPDUsize);
+ printf(" avgPDUsize %d\n", hmhd->avgPDUsize);
+- printf(" maxbitrate %d\n", hmhd->maxbitrate);
+- printf(" avgbitrate %d\n", hmhd->avgbitrate);
+- printf(" slidingavgbitrate %d\n", hmhd->slidingavgbitrate);
++ printf(" maxbitrate %ld\n", hmhd->maxbitrate);
++ printf(" avgbitrate %ld\n", hmhd->avgbitrate);
++ printf(" slidingavgbitrate %ld\n", hmhd->slidingavgbitrate);
+ }
+
+-int quicktime_read_hmhd(quicktime_t *file, quicktime_hmhd_t *hmhd)
++void quicktime_read_hmhd(quicktime_t *file, quicktime_hmhd_t *hmhd)
+ {
+ int i;
+ hmhd->version = quicktime_read_char(file);
+@@ -61,7 +61,7 @@ int quicktime_read_hmhd(quicktime_t *fil
+ hmhd->slidingavgbitrate = quicktime_read_int32(file);
+ }
+
+-int quicktime_write_hmhd(quicktime_t *file, quicktime_hmhd_t *hmhd)
++void quicktime_write_hmhd(quicktime_t *file, quicktime_hmhd_t *hmhd)
+ {
+ quicktime_atom_t atom;
+ int i;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_iods.c b/multimedia/libmp4v2/patches/patch-lib_mp4_iods.c
new file mode 100644
index 00000000000..02662c99533
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_iods.c
@@ -0,0 +1,53 @@
+$NetBSD: patch-lib_mp4_iods.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/iods.c.orig 2017-09-25 14:54:03.383726487 +0000
++++ lib/mp4/iods.c
+@@ -31,12 +31,12 @@ int quicktime_iods_init(quicktime_iods_t
+ return 0;
+ }
+
+-int quicktime_iods_set_audio_profile(quicktime_iods_t* iods, int id)
++void quicktime_iods_set_audio_profile(quicktime_iods_t* iods, int id)
+ {
+ iods->audioProfileId = id;
+ }
+
+-int quicktime_iods_set_video_profile(quicktime_iods_t* iods, int id)
++void quicktime_iods_set_video_profile(quicktime_iods_t* iods, int id)
+ {
+ iods->videoProfileId = id;
+ }
+@@ -46,7 +46,7 @@ int quicktime_iods_delete(quicktime_iods
+ return 0;
+ }
+
+-int quicktime_iods_dump(quicktime_iods_t *iods)
++void quicktime_iods_dump(quicktime_iods_t *iods)
+ {
+ printf(" initial object descriptor\n");
+ printf(" version %d\n", iods->version);
+@@ -55,7 +55,7 @@ int quicktime_iods_dump(quicktime_iods_t
+ printf(" videoProfileId %u\n", iods->videoProfileId);
+ }
+
+-int quicktime_read_iods(quicktime_t *file, quicktime_iods_t *iods)
++void quicktime_read_iods(quicktime_t *file, quicktime_iods_t *iods)
+ {
+ iods->version = quicktime_read_char(file);
+ iods->flags = quicktime_read_int24(file);
+@@ -68,13 +68,13 @@ int quicktime_read_iods(quicktime_t *fil
+ /* will skip the remainder of the atom */
+ }
+
+-int quicktime_write_iods(quicktime_t *file, quicktime_iods_t *iods)
++void quicktime_write_iods(quicktime_t *file, quicktime_iods_t *iods)
+ {
+ quicktime_atom_t atom;
+ int i;
+
+ if (!file->use_mp4) {
+- return 0;
++ return;
+ }
+
+ quicktime_atom_write_header(file, &atom, "iods");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_matrix.c b/multimedia/libmp4v2/patches/patch-lib_mp4_matrix.c
new file mode 100644
index 00000000000..c9f317bb5af
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_matrix.c
@@ -0,0 +1,45 @@
+$NetBSD: patch-lib_mp4_matrix.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/matrix.c.orig 2017-09-25 14:54:37.160447502 +0000
++++ lib/mp4/matrix.c
+@@ -3,7 +3,7 @@
+
+
+
+-int quicktime_matrix_init(quicktime_matrix_t *matrix)
++void quicktime_matrix_init(quicktime_matrix_t *matrix)
+ {
+ int i;
+ for(i = 0; i < 9; i++) matrix->values[i] = 0;
+@@ -11,11 +11,11 @@ int quicktime_matrix_init(quicktime_matr
+ matrix->values[8] = 16384;
+ }
+
+-int quicktime_matrix_delete(quicktime_matrix_t *matrix)
++void quicktime_matrix_delete(quicktime_matrix_t *matrix)
+ {
+ }
+
+-int quicktime_read_matrix(quicktime_t *file, quicktime_matrix_t *matrix)
++void quicktime_read_matrix(quicktime_t *file, quicktime_matrix_t *matrix)
+ {
+ int i = 0;
+ for(i = 0; i < 9; i++)
+@@ -24,7 +24,7 @@ int quicktime_read_matrix(quicktime_t *f
+ }
+ }
+
+-int quicktime_matrix_dump(quicktime_matrix_t *matrix)
++void quicktime_matrix_dump(quicktime_matrix_t *matrix)
+ {
+ int i;
+ printf(" matrix");
+@@ -32,7 +32,7 @@ int quicktime_matrix_dump(quicktime_matr
+ printf("\n");
+ }
+
+-int quicktime_write_matrix(quicktime_t *file, quicktime_matrix_t *matrix)
++void quicktime_write_matrix(quicktime_t *file, quicktime_matrix_t *matrix)
+ {
+ int i;
+ for(i = 0; i < 9; i++)
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_maxr.c b/multimedia/libmp4v2/patches/patch-lib_mp4_maxr.c
new file mode 100644
index 00000000000..7f9db4c4a1a
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_maxr.c
@@ -0,0 +1,42 @@
+$NetBSD: patch-lib_mp4_maxr.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/maxr.c.orig 2017-09-25 14:54:50.509412271 +0000
++++ lib/mp4/maxr.c
+@@ -22,30 +22,30 @@
+ #include "quicktime.h"
+
+
+-int quicktime_maxr_init(quicktime_maxr_t *maxr)
++void quicktime_maxr_init(quicktime_maxr_t *maxr)
+ {
+ maxr->granularity = 0;
+ maxr->maxBitRate = 0;
+ }
+
+-int quicktime_maxr_delete(quicktime_maxr_t *maxr)
++void quicktime_maxr_delete(quicktime_maxr_t *maxr)
+ {
+ }
+
+-int quicktime_maxr_dump(quicktime_maxr_t *maxr)
++void quicktime_maxr_dump(quicktime_maxr_t *maxr)
+ {
+ printf(" max data rate\n");
+- printf(" granularity %lu\n", maxr->granularity);
+- printf(" maxBitRate %lu\n", maxr->maxBitRate);
++ printf(" granularity %u\n", (unsigned)maxr->granularity);
++ printf(" maxBitRate %u\n", (unsigned)maxr->maxBitRate);
+ }
+
+-int quicktime_read_maxr(quicktime_t *file, quicktime_maxr_t *maxr)
++void quicktime_read_maxr(quicktime_t *file, quicktime_maxr_t *maxr)
+ {
+ maxr->granularity = quicktime_read_int32(file);
+ maxr->maxBitRate = quicktime_read_int32(file);
+ }
+
+-int quicktime_write_maxr(quicktime_t *file, quicktime_maxr_t *maxr)
++void quicktime_write_maxr(quicktime_t *file, quicktime_maxr_t *maxr)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_mdat.c b/multimedia/libmp4v2/patches/patch-lib_mp4_mdat.c
new file mode 100644
index 00000000000..f797776cba5
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_mdat.c
@@ -0,0 +1,32 @@
+$NetBSD: patch-lib_mp4_mdat.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/mdat.c.orig 2017-09-25 14:54:53.532822347 +0000
++++ lib/mp4/mdat.c
+@@ -1,23 +1,23 @@
+ #include "quicktime.h"
+
+-int quicktime_mdat_init(quicktime_mdat_t *mdat)
++void quicktime_mdat_init(quicktime_mdat_t *mdat)
+ {
+ mdat->size = 8;
+ mdat->start = 0;
+ }
+
+-int quicktime_mdat_delete(quicktime_mdat_t *mdat)
++void quicktime_mdat_delete(quicktime_mdat_t *mdat)
+ {
+ }
+
+-int quicktime_read_mdat(quicktime_t *file, quicktime_mdat_t *mdat, quicktime_atom_t *parent_atom)
++void quicktime_read_mdat(quicktime_t *file, quicktime_mdat_t *mdat, quicktime_atom_t *parent_atom)
+ {
+ mdat->size = parent_atom->size;
+ mdat->start = parent_atom->start;
+ quicktime_atom_skip(file, parent_atom);
+ }
+
+-int quicktime_write_mdat(quicktime_t *file, quicktime_mdat_t *mdat)
++void quicktime_write_mdat(quicktime_t *file, quicktime_mdat_t *mdat)
+ {
+ long position, size = 0, new_size = 0;
+ int i, j;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_mdhd.c b/multimedia/libmp4v2/patches/patch-lib_mp4_mdhd.c
new file mode 100644
index 00000000000..42ff7d31cff
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_mdhd.c
@@ -0,0 +1,81 @@
+$NetBSD: patch-lib_mp4_mdhd.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/mdhd.c.orig 2017-09-25 14:54:56.041582738 +0000
++++ lib/mp4/mdhd.c
+@@ -1,6 +1,6 @@
+ #include "quicktime.h"
+
+-int quicktime_mdhd_init(quicktime_mdhd_t *mdhd)
++void quicktime_mdhd_init(quicktime_mdhd_t *mdhd)
+ {
+ mdhd->version = 0;
+ mdhd->flags = 0;
+@@ -12,7 +12,7 @@ int quicktime_mdhd_init(quicktime_mdhd_t
+ mdhd->quality = 0;
+ }
+
+-int quicktime_mdhd_init_video(quicktime_t *file,
++void quicktime_mdhd_init_video(quicktime_t *file,
+ quicktime_mdhd_t *mdhd,
+ int time_scale)
+ {
+@@ -20,7 +20,7 @@ int quicktime_mdhd_init_video(quicktime_
+ mdhd->duration = 0; /* set this when closing */
+ }
+
+-int quicktime_mdhd_init_audio(quicktime_t *file,
++void quicktime_mdhd_init_audio(quicktime_t *file,
+ quicktime_mdhd_t *mdhd,
+ int time_scale)
+ {
+@@ -28,7 +28,7 @@ int quicktime_mdhd_init_audio(quicktime_
+ mdhd->duration = 0; /* set this when closing */
+ }
+
+-int quicktime_mdhd_init_hint(quicktime_t *file,
++void quicktime_mdhd_init_hint(quicktime_t *file,
+ quicktime_mdhd_t *mdhd,
+ quicktime_trak_t *refTrak,
+ int time_scale)
+@@ -39,11 +39,11 @@ int quicktime_mdhd_init_hint(quicktime_t
+ mdhd->language = refTrak->mdia.mdhd.language;
+ }
+
+-quicktime_mdhd_delete(quicktime_mdhd_t *mdhd)
++void quicktime_mdhd_delete(quicktime_mdhd_t *mdhd)
+ {
+ }
+
+-int quicktime_read_mdhd(quicktime_t *file, quicktime_mdhd_t *mdhd)
++void quicktime_read_mdhd(quicktime_t *file, quicktime_mdhd_t *mdhd)
+ {
+ mdhd->version = quicktime_read_char(file);
+ mdhd->flags = quicktime_read_int24(file);
+@@ -55,20 +55,20 @@ int quicktime_read_mdhd(quicktime_t *fil
+ mdhd->quality = quicktime_read_int16(file);
+ }
+
+-int quicktime_mdhd_dump(quicktime_mdhd_t *mdhd)
++void quicktime_mdhd_dump(quicktime_mdhd_t *mdhd)
+ {
+ printf(" media header\n");
+ printf(" version %d\n", mdhd->version);
+- printf(" flags %d\n", mdhd->flags);
+- printf(" creation_time %u\n", mdhd->creation_time);
+- printf(" modification_time %u\n", mdhd->modification_time);
+- printf(" time_scale %d\n", mdhd->time_scale);
+- printf(" duration %d\n", mdhd->duration);
++ printf(" flags %ld\n", mdhd->flags);
++ printf(" creation_time %lu\n", mdhd->creation_time);
++ printf(" modification_time %lu\n", mdhd->modification_time);
++ printf(" time_scale %ld\n", mdhd->time_scale);
++ printf(" duration %ld\n", mdhd->duration);
+ printf(" language %d\n", mdhd->language);
+ printf(" quality %d\n", mdhd->quality);
+ }
+
+-int quicktime_write_mdhd(quicktime_t *file, quicktime_mdhd_t *mdhd)
++void quicktime_write_mdhd(quicktime_t *file, quicktime_mdhd_t *mdhd)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, "mdhd");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_mdia.c b/multimedia/libmp4v2/patches/patch-lib_mp4_mdia.c
new file mode 100644
index 00000000000..4fd898d6498
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_mdia.c
@@ -0,0 +1,65 @@
+$NetBSD: patch-lib_mp4_mdia.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/mdia.c.orig 2017-09-25 14:55:55.174088895 +0000
++++ lib/mp4/mdia.c
+@@ -1,14 +1,14 @@
+ #include "quicktime.h"
+
+
+-int quicktime_mdia_init(quicktime_mdia_t *mdia)
++void quicktime_mdia_init(quicktime_mdia_t *mdia)
+ {
+ quicktime_mdhd_init(&(mdia->mdhd));
+ quicktime_hdlr_init(&(mdia->hdlr));
+ quicktime_minf_init(&(mdia->minf));
+ }
+
+-int quicktime_mdia_init_video(quicktime_t *file,
++void quicktime_mdia_init_video(quicktime_t *file,
+ quicktime_mdia_t *mdia,
+ int frame_w,
+ int frame_h,
+@@ -21,7 +21,7 @@ int quicktime_mdia_init_video(quicktime_
+ quicktime_hdlr_init_video(&(mdia->hdlr));
+ }
+
+-int quicktime_mdia_init_audio(quicktime_t *file,
++void quicktime_mdia_init_audio(quicktime_t *file,
+ quicktime_mdia_t *mdia,
+ int channels,
+ int sample_rate,
+@@ -36,7 +36,7 @@ int quicktime_mdia_init_audio(quicktime_
+ quicktime_hdlr_init_audio(&(mdia->hdlr));
+ }
+
+-int quicktime_mdia_init_hint(quicktime_t *file,
++void quicktime_mdia_init_hint(quicktime_t *file,
+ quicktime_mdia_t *mdia,
+ quicktime_trak_t *refTrak,
+ int maxPktSize,
+@@ -49,14 +49,14 @@ int quicktime_mdia_init_hint(quicktime_t
+ quicktime_hdlr_init_hint(&(mdia->hdlr));
+ }
+
+-int quicktime_mdia_delete(quicktime_mdia_t *mdia)
++void quicktime_mdia_delete(quicktime_mdia_t *mdia)
+ {
+ quicktime_mdhd_delete(&(mdia->mdhd));
+ quicktime_hdlr_delete(&(mdia->hdlr));
+ quicktime_minf_delete(&(mdia->minf));
+ }
+
+-int quicktime_mdia_dump(quicktime_mdia_t *mdia)
++void quicktime_mdia_dump(quicktime_mdia_t *mdia)
+ {
+ printf(" media\n");
+ quicktime_mdhd_dump(&(mdia->mdhd));
+@@ -93,7 +93,7 @@ int quicktime_read_mdia(quicktime_t *fil
+ return 0;
+ }
+
+-int quicktime_write_mdia(quicktime_t *file, quicktime_mdia_t *mdia)
++void quicktime_write_mdia(quicktime_t *file, quicktime_mdia_t *mdia)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, "mdia");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_minf.c b/multimedia/libmp4v2/patches/patch-lib_mp4_minf.c
new file mode 100644
index 00000000000..f8f6c9f6c04
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_minf.c
@@ -0,0 +1,76 @@
+$NetBSD: patch-lib_mp4_minf.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/minf.c.orig 2017-09-25 14:55:53.118744073 +0000
++++ lib/mp4/minf.c
+@@ -2,7 +2,7 @@
+
+
+
+-int quicktime_minf_init(quicktime_minf_t *minf)
++void quicktime_minf_init(quicktime_minf_t *minf)
+ {
+ minf->is_video = minf->is_audio = minf->is_hint = 0;
+ quicktime_vmhd_init(&(minf->vmhd));
+@@ -12,7 +12,7 @@ int quicktime_minf_init(quicktime_minf_t
+ quicktime_stbl_init(&(minf->stbl));
+ }
+
+-int quicktime_minf_init_video(quicktime_t *file,
++void quicktime_minf_init_video(quicktime_t *file,
+ quicktime_minf_t *minf,
+ int frame_w,
+ int frame_h,
+@@ -27,7 +27,7 @@ int quicktime_minf_init_video(quicktime_
+ quicktime_dinf_init_all(&(minf->dinf));
+ }
+
+-int quicktime_minf_init_audio(quicktime_t *file,
++void quicktime_minf_init_audio(quicktime_t *file,
+ quicktime_minf_t *minf,
+ int channels,
+ int sample_rate,
+@@ -44,7 +44,7 @@ int quicktime_minf_init_audio(quicktime_
+ quicktime_dinf_init_all(&(minf->dinf));
+ }
+
+-int quicktime_minf_init_hint(quicktime_t *file,
++void quicktime_minf_init_hint(quicktime_t *file,
+ quicktime_minf_t *minf,
+ quicktime_trak_t *refTrak,
+ int maxPktSize,
+@@ -59,7 +59,7 @@ int quicktime_minf_init_hint(quicktime_t
+ quicktime_dinf_init_all(&(minf->dinf));
+ }
+
+-int quicktime_minf_delete(quicktime_minf_t *minf)
++void quicktime_minf_delete(quicktime_minf_t *minf)
+ {
+ quicktime_vmhd_delete(&(minf->vmhd));
+ quicktime_smhd_delete(&(minf->smhd));
+@@ -70,7 +70,7 @@ int quicktime_minf_delete(quicktime_minf
+ quicktime_hdlr_delete(&(minf->hdlr));
+ }
+
+-int quicktime_minf_dump(quicktime_minf_t *minf)
++void quicktime_minf_dump(quicktime_minf_t *minf)
+ {
+ printf(" media info\n");
+ printf(" is_audio %d\n", minf->is_audio);
+@@ -108,7 +108,7 @@ int quicktime_read_minf(quicktime_t *fil
+ { minf->is_hint = 1; quicktime_read_gmhd(file, &(minf->gmhd), &leaf_atom); }
+ else
+ if(quicktime_atom_is(&leaf_atom, "hmhd"))
+- { minf->is_hint = 1; quicktime_read_hmhd(file, &(minf->hmhd), &leaf_atom); }
++ { minf->is_hint = 1; quicktime_read_hmhd(file, &(minf->hmhd)); }
+ else
+ if(quicktime_atom_is(&leaf_atom, "hdlr"))
+ {
+@@ -138,7 +138,7 @@ int quicktime_read_minf(quicktime_t *fil
+ return 0;
+ }
+
+-int quicktime_write_minf(quicktime_t *file, quicktime_minf_t *minf)
++void quicktime_write_minf(quicktime_t *file, quicktime_minf_t *minf)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, "minf");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_moov.c b/multimedia/libmp4v2/patches/patch-lib_mp4_moov.c
new file mode 100644
index 00000000000..5a3e13a1ada
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_moov.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-lib_mp4_moov.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/moov.c.orig 2017-09-25 14:55:51.205340295 +0000
++++ lib/mp4/moov.c
+@@ -28,7 +28,7 @@ int quicktime_moov_delete(quicktime_moov
+ return 0;
+ }
+
+-int quicktime_moov_dump(quicktime_moov_t *moov)
++void quicktime_moov_dump(quicktime_moov_t *moov)
+ {
+ int i;
+ printf("movie\n");
+@@ -91,7 +91,7 @@ int quicktime_read_moov(quicktime_t *fil
+ return 0;
+ }
+
+-int quicktime_write_moov(quicktime_t *file, quicktime_moov_t *moov)
++void quicktime_write_moov(quicktime_t *file, quicktime_moov_t *moov)
+ {
+ quicktime_atom_t atom;
+ int i;
+@@ -128,7 +128,7 @@ int quicktime_write_moov(quicktime_t *fi
+ quicktime_atom_write_footer(file, &atom);
+ }
+
+-int quicktime_update_durations(quicktime_moov_t *moov)
++void quicktime_update_durations(quicktime_moov_t *moov)
+ {
+
+ }
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_mvhd.c b/multimedia/libmp4v2/patches/patch-lib_mp4_mvhd.c
new file mode 100644
index 00000000000..e06adb55b91
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_mvhd.c
@@ -0,0 +1,39 @@
+$NetBSD: patch-lib_mp4_mvhd.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/mvhd.c.orig 2017-09-25 14:55:49.237133276 +0000
++++ lib/mp4/mvhd.c
+@@ -30,13 +30,13 @@ int quicktime_mvhd_delete(quicktime_mvhd
+ return 0;
+ }
+
+-int quicktime_mvhd_dump(quicktime_mvhd_t *mvhd)
++void quicktime_mvhd_dump(quicktime_mvhd_t *mvhd)
+ {
+ printf(" movie header\n");
+ printf(" version %d\n", mvhd->version);
+ printf(" flags %ld\n", mvhd->flags);
+- printf(" creation_time %u\n", mvhd->creation_time);
+- printf(" modification_time %u\n", mvhd->modification_time);
++ printf(" creation_time %lu\n", mvhd->creation_time);
++ printf(" modification_time %lu\n", mvhd->modification_time);
+ printf(" time_scale %ld\n", mvhd->time_scale);
+ printf(" duration %ld\n", mvhd->duration);
+ printf(" preferred_rate %f\n", mvhd->preferred_rate);
+@@ -52,7 +52,7 @@ int quicktime_mvhd_dump(quicktime_mvhd_t
+ printf(" next_track_id %ld\n", mvhd->next_track_id);
+ }
+
+-int quicktime_read_mvhd(quicktime_t *file, quicktime_mvhd_t *mvhd)
++void quicktime_read_mvhd(quicktime_t *file, quicktime_mvhd_t *mvhd)
+ {
+ mvhd->version = quicktime_read_char(file);
+ mvhd->flags = quicktime_read_int24(file);
+@@ -73,7 +73,7 @@ int quicktime_read_mvhd(quicktime_t *fil
+ mvhd->next_track_id = quicktime_read_int32(file);
+ }
+
+-int quicktime_write_mvhd(quicktime_t *file, quicktime_mvhd_t *mvhd)
++void quicktime_write_mvhd(quicktime_t *file, quicktime_mvhd_t *mvhd)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, "mvhd");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_nump.c b/multimedia/libmp4v2/patches/patch-lib_mp4_nump.c
new file mode 100644
index 00000000000..b348daaea91
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_nump.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-lib_mp4_nump.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/nump.c.orig 2017-09-25 14:55:47.324092855 +0000
++++ lib/mp4/nump.c
+@@ -22,27 +22,27 @@
+ #include "quicktime.h"
+
+
+-int quicktime_nump_init(quicktime_nump_t *nump)
++void quicktime_nump_init(quicktime_nump_t *nump)
+ {
+ nump->numPackets = 0;
+ }
+
+-int quicktime_nump_delete(quicktime_nump_t *nump)
++void quicktime_nump_delete(quicktime_nump_t *nump)
+ {
+ }
+
+-int quicktime_nump_dump(quicktime_nump_t *nump)
++void quicktime_nump_dump(quicktime_nump_t *nump)
+ {
+ printf(" total RTP packets\n");
+ printf(" numBytes "U64"\n", nump->numPackets);
+ }
+
+-int quicktime_read_nump(quicktime_t *file, quicktime_nump_t *nump)
++void quicktime_read_nump(quicktime_t *file, quicktime_nump_t *nump)
+ {
+ nump->numPackets = quicktime_read_int64(file);
+ }
+
+-int quicktime_write_nump(quicktime_t *file, quicktime_nump_t *nump)
++void quicktime_write_nump(quicktime_t *file, quicktime_nump_t *nump)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_payt.c b/multimedia/libmp4v2/patches/patch-lib_mp4_payt.c
new file mode 100644
index 00000000000..aadc2897aab
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_payt.c
@@ -0,0 +1,41 @@
+$NetBSD: patch-lib_mp4_payt.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/payt.c.orig 2017-09-25 14:55:45.324938288 +0000
++++ lib/mp4/payt.c
+@@ -22,30 +22,30 @@
+ #include "quicktime.h"
+
+
+-int quicktime_payt_init(quicktime_payt_t *payt)
++void quicktime_payt_init(quicktime_payt_t *payt)
+ {
+ payt->payloadNumber = 0;
+ payt->rtpMapString[0] = '\0';
+ }
+
+-int quicktime_payt_delete(quicktime_payt_t *payt)
++void quicktime_payt_delete(quicktime_payt_t *payt)
+ {
+ }
+
+-int quicktime_payt_dump(quicktime_payt_t *payt)
++void quicktime_payt_dump(quicktime_payt_t *payt)
+ {
+ printf(" payload type\n");
+- printf(" payload number %lu\n", payt->payloadNumber);
++ printf(" payload number %u\n", (unsigned)payt->payloadNumber);
+ printf(" rtp map string %s\n", payt->rtpMapString);
+ }
+
+-int quicktime_read_payt(quicktime_t *file, quicktime_payt_t *payt)
++void quicktime_read_payt(quicktime_t *file, quicktime_payt_t *payt)
+ {
+ payt->payloadNumber = quicktime_read_int32(file);
+ quicktime_read_pascal(file, payt->rtpMapString);
+ }
+
+-int quicktime_write_payt(quicktime_t *file, quicktime_payt_t *payt)
++void quicktime_write_payt(quicktime_t *file, quicktime_payt_t *payt)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_pmax.c b/multimedia/libmp4v2/patches/patch-lib_mp4_pmax.c
new file mode 100644
index 00000000000..9b05e5befc2
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_pmax.c
@@ -0,0 +1,38 @@
+$NetBSD: patch-lib_mp4_pmax.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/pmax.c.orig 2017-09-25 14:55:43.236863278 +0000
++++ lib/mp4/pmax.c
+@@ -22,27 +22,27 @@
+ #include "quicktime.h"
+
+
+-int quicktime_pmax_init(quicktime_pmax_t *pmax)
++void quicktime_pmax_init(quicktime_pmax_t *pmax)
+ {
+ pmax->numBytes = 0;
+ }
+
+-int quicktime_pmax_delete(quicktime_pmax_t *pmax)
++void quicktime_pmax_delete(quicktime_pmax_t *pmax)
+ {
+ }
+
+-int quicktime_pmax_dump(quicktime_pmax_t *pmax)
++void quicktime_pmax_dump(quicktime_pmax_t *pmax)
+ {
+ printf(" max packet size\n");
+- printf(" numBytes %lu\n", pmax->numBytes);
++ printf(" numBytes %u\n", (unsigned)pmax->numBytes);
+ }
+
+-int quicktime_read_pmax(quicktime_t *file, quicktime_pmax_t *pmax)
++void quicktime_read_pmax(quicktime_t *file, quicktime_pmax_t *pmax)
+ {
+ pmax->numBytes = quicktime_read_int32(file);
+ }
+
+-int quicktime_write_pmax(quicktime_t *file, quicktime_pmax_t *pmax)
++void quicktime_write_pmax(quicktime_t *file, quicktime_pmax_t *pmax)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_quicktime.c b/multimedia/libmp4v2/patches/patch-lib_mp4_quicktime.c
new file mode 100644
index 00000000000..a743504ce33
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_quicktime.c
@@ -0,0 +1,101 @@
+$NetBSD: patch-lib_mp4_quicktime.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/quicktime.c.orig 2017-09-25 14:55:41.219458342 +0000
++++ lib/mp4/quicktime.c
+@@ -132,22 +132,22 @@ int quicktime_make_streamable(char *in_p
+ return 0;
+ }
+
+-int quicktime_set_time_scale(quicktime_t *file, int time_scale)
++void quicktime_set_time_scale(quicktime_t *file, int time_scale)
+ {
+ file->moov.mvhd.time_scale = time_scale;
+ }
+
+-int quicktime_set_copyright(quicktime_t *file, char *string)
++void quicktime_set_copyright(quicktime_t *file, char *string)
+ {
+ quicktime_set_udta_string(&(file->moov.udta.copyright), &(file->moov.udta.copyright_len), string);
+ }
+
+-int quicktime_set_name(quicktime_t *file, char *string)
++void quicktime_set_name(quicktime_t *file, char *string)
+ {
+ quicktime_set_udta_string(&(file->moov.udta.name), &(file->moov.udta.name_len), string);
+ }
+
+-int quicktime_set_info(quicktime_t *file, char *string)
++void quicktime_set_info(quicktime_t *file, char *string)
+ {
+ quicktime_set_udta_string(&(file->moov.udta.info), &(file->moov.udta.info_len), string);
+ }
+@@ -177,7 +177,7 @@ int quicktime_get_iod_audio_profile_leve
+ return file->moov.iods.audioProfileId;
+ }
+
+-int quicktime_set_iod_audio_profile_level(quicktime_t *file, int id)
++void quicktime_set_iod_audio_profile_level(quicktime_t *file, int id)
+ {
+ quicktime_iods_set_audio_profile(&file->moov.iods, id);
+ }
+@@ -187,7 +187,7 @@ int quicktime_get_iod_video_profile_leve
+ return file->moov.iods.videoProfileId;
+ }
+
+-int quicktime_set_iod_video_profile_level(quicktime_t *file, int id)
++void quicktime_set_iod_video_profile_level(quicktime_t *file, int id)
+ {
+ quicktime_iods_set_video_profile(&file->moov.iods, id);
+ }
+@@ -431,12 +431,12 @@ char* quicktime_get_session_sdp(quicktim
+ return file->moov.udta.hnti.rtp.string;
+ }
+
+-int quicktime_set_session_sdp(quicktime_t *file, char* sdpString)
++void quicktime_set_session_sdp(quicktime_t *file, char* sdpString)
+ {
+- return quicktime_rtp_set(&(file->moov.udta.hnti.rtp), sdpString);
++ quicktime_rtp_set(&(file->moov.udta.hnti.rtp), sdpString);
+ }
+
+-int quicktime_add_audio_sdp(quicktime_t *file, char* sdpString, int track, int hintTrack)
++void quicktime_add_audio_sdp(quicktime_t *file, char* sdpString, int track, int hintTrack)
+ {
+ quicktime_trak_t* hintTrak =
+ file->atracks[track].hintTracks[hintTrack];
+@@ -444,7 +444,7 @@ int quicktime_add_audio_sdp(quicktime_t
+ quicktime_sdp_append(&(hintTrak->hint_udta.hnti.sdp), sdpString);
+ }
+
+-int quicktime_add_video_sdp(quicktime_t *file, char* sdpString, int track, int hintTrack)
++void quicktime_add_video_sdp(quicktime_t *file, char* sdpString, int track, int hintTrack)
+ {
+ quicktime_trak_t* hintTrak =
+ file->vtracks[track].hintTracks[hintTrack];
+@@ -486,7 +486,7 @@ int quicktime_set_video_hint_max_rate(qu
+ granularity, maxBitRate, hintTrak);
+ }
+
+-int quicktime_set_framerate(quicktime_t *file, float framerate)
++void quicktime_set_framerate(quicktime_t *file, float framerate)
+ {
+ int i;
+ int new_time_scale, new_sample_duration;
+@@ -557,7 +557,7 @@ int quicktime_set_cpus(quicktime_t *file
+ return 0;
+ }
+
+-int quicktime_set_preload(quicktime_t *file, long preload)
++void quicktime_set_preload(quicktime_t *file, long preload)
+ {
+ if(!file->preload_size)
+ {
+@@ -801,7 +801,7 @@ int quicktime_video_depth(quicktime_t *f
+ return 0;
+ }
+
+-int quicktime_set_depth(quicktime_t *file, int depth, int track)
++void quicktime_set_depth(quicktime_t *file, int depth, int track)
+ {
+ int i;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_quicktime.h b/multimedia/libmp4v2/patches/patch-lib_mp4_quicktime.h
new file mode 100644
index 00000000000..3e91f16dce7
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_quicktime.h
@@ -0,0 +1,82 @@
+$NetBSD: patch-lib_mp4_quicktime.h,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/quicktime.h.orig 2017-09-25 15:14:46.164094744 +0000
++++ lib/mp4/quicktime.h
+@@ -82,10 +82,10 @@ quicktime_t* quicktime_open(char *filena
+ int quicktime_make_streamable(char *in_path, char *out_path);
+
+ /* Set various options in the file. */
+-int quicktime_set_time_scale(quicktime_t *file, int time_scale);
+-int quicktime_set_copyright(quicktime_t *file, char *string);
+-int quicktime_set_name(quicktime_t *file, char *string);
+-int quicktime_set_info(quicktime_t *file, char *string);
++void quicktime_set_time_scale(quicktime_t *file, int time_scale);
++void quicktime_set_copyright(quicktime_t *file, char *string);
++void quicktime_set_name(quicktime_t *file, char *string);
++void quicktime_set_info(quicktime_t *file, char *string);
+ int quicktime_get_time_scale(quicktime_t *file);
+ char* quicktime_get_copyright(quicktime_t *file);
+ char* quicktime_get_name(quicktime_t *file);
+@@ -104,7 +104,7 @@ int quicktime_set_audio(quicktime_t *fil
+ int quicktime_set_audio_hint(quicktime_t *file, int track, char *payloadName, u_int* pPayloadNumber, int maxPktSize);
+
+ /* Samplerate can be set after file is created */
+-int quicktime_set_framerate(quicktime_t *file, float framerate);
++void quicktime_set_framerate(quicktime_t *file, float framerate);
+
+ /* video is stored one layer per quicktime track */
+ int quicktime_set_video(quicktime_t *file, int tracks, int frame_w, int frame_h, float frame_rate, int time_scale, char *compressor);
+@@ -116,7 +116,7 @@ int quicktime_set_video_hint(quicktime_t
+ int quicktime_set_jpeg(quicktime_t *file, int quality, int use_float);
+
+ /* Set the depth of the track. */
+-int quicktime_set_depth(quicktime_t *file, int depth, int track);
++void quicktime_set_depth(quicktime_t *file, int depth, int track);
+
+ /* close the file and delete all the objects */
+ int quicktime_write(quicktime_t *file);
+@@ -156,9 +156,9 @@ int quicktime_video_frame_time(quicktime
+ long *start_time, int *duration);
+
+ int quicktime_get_iod_audio_profile_level(quicktime_t *file);
+-int quicktime_set_iod_audio_profile_level(quicktime_t *file, int id);
++void quicktime_set_iod_audio_profile_level(quicktime_t *file, int id);
+ int quicktime_get_iod_video_profile_level(quicktime_t *file);
+-int quicktime_set_iod_video_profile_level(quicktime_t *file, int id);
++void quicktime_set_iod_video_profile_level(quicktime_t *file, int id);
+
+ int quicktime_get_mp4_video_decoder_config(quicktime_t *file, int track, u_char** ppBuf, int* pBufSize);
+ int quicktime_set_mp4_video_decoder_config(quicktime_t *file, int track, u_char* pBuf, int bufSize);
+@@ -166,11 +166,11 @@ int quicktime_get_mp4_audio_decoder_conf
+ int quicktime_set_mp4_audio_decoder_config(quicktime_t *file, int track, u_char* pBuf, int bufSize);
+
+ char* quicktime_get_session_sdp(quicktime_t *file);
+-int quicktime_set_session_sdp(quicktime_t *file, char* sdpString);
++void quicktime_set_session_sdp(quicktime_t *file, char* sdpString);
+
+-int quicktime_add_audio_sdp(quicktime_t *file, char* sdpString, int track, int hintTrack);
++void quicktime_add_audio_sdp(quicktime_t *file, char* sdpString, int track, int hintTrack);
+
+-int quicktime_add_video_sdp(quicktime_t *file, char* sdpString, int track, int hintTrack);
++void quicktime_add_video_sdp(quicktime_t *file, char* sdpString, int track, int hintTrack);
+
+ int quicktime_set_audio_hint_max_rate(quicktime_t *file, int granularity, int maxBitRate, int audioTrack, int hintTrack);
+
+@@ -245,7 +245,7 @@ int quicktime_dump_hint_packet(u_char* h
+ int quicktime_dump_hint_data(u_char* hintBuf);
+
+ int quicktime_get_hint_size(u_char* hintBuf);
+-int quicktime_get_hint_info(u_char* hintBuf, u_int hintBufSize, quicktime_hint_info_t* pHintInfo);
++void quicktime_get_hint_info(u_char* hintBuf, u_int hintBufSize, quicktime_hint_info_t* pHintInfo);
+
+ /* ===================== Access to built in codecs follows. */
+
+@@ -289,7 +289,7 @@ int quicktime_set_cpus(quicktime_t *file
+
+ /* Specify whether to read contiguously or not. */
+ /* preload is the number of bytes to read ahead. */
+-int quicktime_set_preload(quicktime_t *file, long preload);
++void quicktime_set_preload(quicktime_t *file, long preload);
+
+ /* Test the 32 bit overflow */
+ int quicktime_test_position(quicktime_t *file);
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_rtphint.c b/multimedia/libmp4v2/patches/patch-lib_mp4_rtphint.c
new file mode 100644
index 00000000000..7293a5ebd76
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_rtphint.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-lib_mp4_rtphint.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/rtphint.c.orig 2017-09-25 14:55:37.538498204 +0000
++++ lib/mp4/rtphint.c
+@@ -202,7 +202,7 @@ int quicktime_dump_hint_packet(u_char* h
+ u_char* bufPtr;
+ int i;
+
+- fprintf(stdout, " relativeXmitTime %lu\n", ntohl(packetEntry->relativeXmitTime));
++ fprintf(stdout, " relativeXmitTime %u\n", (unsigned)ntohl(packetEntry->relativeXmitTime));
+ fprintf(stdout, " headerInfo %x\n", packetEntry->headerInfo);
+ fprintf(stdout, " seqNum %u\n", ntohs(packetEntry->seqNum));
+ fprintf(stdout, " flags %x\n", ntohs(packetEntry->flags));
+@@ -317,7 +317,7 @@ int quicktime_get_packet_size(u_char* hi
+ + (numDataEntries * sizeof(quicktime_rtp_data_entry_t));
+ }
+
+-int quicktime_get_hint_info(u_char* hintBuf, u_int hintBufSize, quicktime_hint_info_t* pHintInfo)
++void quicktime_get_hint_info(u_char* hintBuf, u_int hintBufSize, quicktime_hint_info_t* pHintInfo)
+ {
+ quicktime_rtp_sample_t* sample = quicktime_get_hint_sample(hintBuf);
+ u_int16_t numPacketEntries = ntohs(sample->entryCount);
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_smhd.c b/multimedia/libmp4v2/patches/patch-lib_mp4_smhd.c
new file mode 100644
index 00000000000..fb159cd372c
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_smhd.c
@@ -0,0 +1,47 @@
+$NetBSD: patch-lib_mp4_smhd.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/smhd.c.orig 2017-09-25 14:55:33.725106695 +0000
++++ lib/mp4/smhd.c
+@@ -3,7 +3,7 @@
+
+
+
+-int quicktime_smhd_init(quicktime_smhd_t *smhd)
++void quicktime_smhd_init(quicktime_smhd_t *smhd)
+ {
+ smhd->version = 0;
+ smhd->flags = 0;
+@@ -11,20 +11,20 @@ int quicktime_smhd_init(quicktime_smhd_t
+ smhd->reserved = 0;
+ }
+
+-int quicktime_smhd_delete(quicktime_smhd_t *smhd)
++void quicktime_smhd_delete(quicktime_smhd_t *smhd)
+ {
+ }
+
+-int quicktime_smhd_dump(quicktime_smhd_t *smhd)
++void quicktime_smhd_dump(quicktime_smhd_t *smhd)
+ {
+ printf(" sound media header\n");
+ printf(" version %d\n", smhd->version);
+- printf(" flags %d\n", smhd->flags);
++ printf(" flags %ld\n", smhd->flags);
+ printf(" balance %d\n", smhd->balance);
+ printf(" reserved %d\n", smhd->reserved);
+ }
+
+-int quicktime_read_smhd(quicktime_t *file, quicktime_smhd_t *smhd)
++void quicktime_read_smhd(quicktime_t *file, quicktime_smhd_t *smhd)
+ {
+ smhd->version = quicktime_read_char(file);
+ smhd->flags = quicktime_read_int24(file);
+@@ -32,7 +32,7 @@ int quicktime_read_smhd(quicktime_t *fil
+ smhd->reserved = quicktime_read_int16(file);
+ }
+
+-int quicktime_write_smhd(quicktime_t *file, quicktime_smhd_t *smhd)
++void quicktime_write_smhd(quicktime_t *file, quicktime_smhd_t *smhd)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, "smhd");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_stbl.c b/multimedia/libmp4v2/patches/patch-lib_mp4_stbl.c
new file mode 100644
index 00000000000..0148e5f04fb
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_stbl.c
@@ -0,0 +1,66 @@
+$NetBSD: patch-lib_mp4_stbl.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/stbl.c.orig 2017-09-25 14:55:31.669269970 +0000
++++ lib/mp4/stbl.c
+@@ -1,6 +1,6 @@
+ #include "quicktime.h"
+
+-int quicktime_stbl_init(quicktime_stbl_t *stbl)
++void quicktime_stbl_init(quicktime_stbl_t *stbl)
+ {
+ stbl->version = 0;
+ stbl->flags = 0;
+@@ -13,7 +13,7 @@ int quicktime_stbl_init(quicktime_stbl_t
+ quicktime_ctts_init(&(stbl->ctts));
+ }
+
+-int quicktime_stbl_init_video(quicktime_t *file,
++void quicktime_stbl_init_video(quicktime_t *file,
+ quicktime_stbl_t *stbl,
+ int frame_w,
+ int frame_h,
+@@ -31,7 +31,7 @@ int quicktime_stbl_init_video(quicktime_
+ }
+
+
+-int quicktime_stbl_init_audio(quicktime_t *file,
++void quicktime_stbl_init_audio(quicktime_t *file,
+ quicktime_stbl_t *stbl,
+ int channels,
+ int sample_rate,
+@@ -50,7 +50,7 @@ int quicktime_stbl_init_audio(quicktime_
+ quicktime_ctts_init_common(file, &(stbl->ctts));
+ }
+
+-int quicktime_stbl_init_hint(quicktime_t *file,
++void quicktime_stbl_init_hint(quicktime_t *file,
+ quicktime_stbl_t *stbl,
+ quicktime_trak_t *refTrak,
+ int maxPktSize,
+@@ -67,7 +67,7 @@ int quicktime_stbl_init_hint(quicktime_t
+ quicktime_ctts_init_common(file, &(stbl->ctts));
+ }
+
+-int quicktime_stbl_delete(quicktime_stbl_t *stbl)
++void quicktime_stbl_delete(quicktime_stbl_t *stbl)
+ {
+ quicktime_stsd_delete(&(stbl->stsd));
+ quicktime_stts_delete(&(stbl->stts));
+@@ -78,7 +78,7 @@ int quicktime_stbl_delete(quicktime_stbl
+ quicktime_ctts_delete(&(stbl->ctts));
+ }
+
+-int quicktime_stbl_dump(void *minf_ptr, quicktime_stbl_t *stbl)
++void quicktime_stbl_dump(void *minf_ptr, quicktime_stbl_t *stbl)
+ {
+ printf(" sample table\n");
+ quicktime_stsd_dump(minf_ptr, &(stbl->stsd));
+@@ -130,7 +130,7 @@ int quicktime_read_stbl(quicktime_t *fil
+ return 0;
+ }
+
+-int quicktime_write_stbl(quicktime_t *file, quicktime_minf_t *minf, quicktime_stbl_t *stbl)
++void quicktime_write_stbl(quicktime_t *file, quicktime_minf_t *minf, quicktime_stbl_t *stbl)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, "stbl");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_stco.c b/multimedia/libmp4v2/patches/patch-lib_mp4_stco.c
new file mode 100644
index 00000000000..20772938c58
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_stco.c
@@ -0,0 +1,74 @@
+$NetBSD: patch-lib_mp4_stco.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/stco.c.orig 2017-09-25 14:55:29.637953605 +0000
++++ lib/mp4/stco.c
+@@ -2,7 +2,7 @@
+
+
+
+-int quicktime_stco_init(quicktime_stco_t *stco)
++void quicktime_stco_init(quicktime_stco_t *stco)
+ {
+ stco->version = 0;
+ stco->flags = 0;
+@@ -10,14 +10,14 @@ int quicktime_stco_init(quicktime_stco_t
+ stco->entries_allocated = 0;
+ }
+
+-int quicktime_stco_delete(quicktime_stco_t *stco)
++void quicktime_stco_delete(quicktime_stco_t *stco)
+ {
+ if(stco->total_entries) free(stco->table);
+ stco->total_entries = 0;
+ stco->entries_allocated = 0;
+ }
+
+-int quicktime_stco_init_common(quicktime_t *file, quicktime_stco_t *stco)
++void quicktime_stco_init_common(quicktime_t *file, quicktime_stco_t *stco)
+ {
+ if(!stco->entries_allocated)
+ {
+@@ -28,20 +28,20 @@ int quicktime_stco_init_common(quicktime
+ }
+ }
+
+-int quicktime_stco_dump(quicktime_stco_t *stco)
++void quicktime_stco_dump(quicktime_stco_t *stco)
+ {
+ int i;
+ printf(" chunk offset\n");
+ printf(" version %d\n", stco->version);
+- printf(" flags %d\n", stco->flags);
+- printf(" total_entries %d\n", stco->total_entries);
++ printf(" flags %ld\n", stco->flags);
++ printf(" total_entries %ld\n", stco->total_entries);
+ for(i = 0; i < stco->total_entries; i++)
+ {
+- printf(" offset %d %x\n", i, stco->table[i].offset);
++ printf(" offset %d %lx\n", i, stco->table[i].offset);
+ }
+ }
+
+-int quicktime_read_stco(quicktime_t *file, quicktime_stco_t *stco)
++void quicktime_read_stco(quicktime_t *file, quicktime_stco_t *stco)
+ {
+ int i;
+ stco->version = quicktime_read_char(file);
+@@ -56,7 +56,7 @@ int quicktime_read_stco(quicktime_t *fil
+ }
+ }
+
+-int quicktime_write_stco(quicktime_t *file, quicktime_stco_t *stco)
++void quicktime_write_stco(quicktime_t *file, quicktime_stco_t *stco)
+ {
+ int i;
+ quicktime_atom_t atom;
+@@ -73,7 +73,7 @@ int quicktime_write_stco(quicktime_t *fi
+ quicktime_atom_write_footer(file, &atom);
+ }
+
+-int quicktime_update_stco(quicktime_stco_t *stco, long chunk, long offset)
++void quicktime_update_stco(quicktime_stco_t *stco, long chunk, long offset)
+ {
+ quicktime_stco_table_t *new_table;
+ long i;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_stsc.c b/multimedia/libmp4v2/patches/patch-lib_mp4_stsc.c
new file mode 100644
index 00000000000..8d909427d68
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_stsc.c
@@ -0,0 +1,83 @@
+$NetBSD: patch-lib_mp4_stsc.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/stsc.c.orig 2017-09-25 14:55:27.294079758 +0000
++++ lib/mp4/stsc.c
+@@ -2,7 +2,7 @@
+
+
+
+-int quicktime_stsc_init(quicktime_stsc_t *stsc)
++void quicktime_stsc_init(quicktime_stsc_t *stsc)
+ {
+ stsc->version = 0;
+ stsc->flags = 0;
+@@ -10,7 +10,7 @@ int quicktime_stsc_init(quicktime_stsc_t
+ stsc->entries_allocated = 0;
+ }
+
+-int quicktime_stsc_init_table(quicktime_t *file, quicktime_stsc_t *stsc)
++void quicktime_stsc_init_table(quicktime_t *file, quicktime_stsc_t *stsc)
+ {
+ if(!stsc->total_entries)
+ {
+@@ -20,7 +20,7 @@ int quicktime_stsc_init_table(quicktime_
+ }
+ }
+
+-int quicktime_stsc_init_video(quicktime_t *file, quicktime_stsc_t *stsc)
++void quicktime_stsc_init_video(quicktime_t *file, quicktime_stsc_t *stsc)
+ {
+ quicktime_stsc_table_t *table;
+ quicktime_stsc_init_table(file, stsc);
+@@ -30,7 +30,7 @@ int quicktime_stsc_init_video(quicktime_
+ table->id = 1;
+ }
+
+-int quicktime_stsc_init_audio(quicktime_t *file, quicktime_stsc_t *stsc)
++void quicktime_stsc_init_audio(quicktime_t *file, quicktime_stsc_t *stsc)
+ {
+ quicktime_stsc_table_t *table;
+ quicktime_stsc_init_table(file, stsc);
+@@ -40,27 +40,27 @@ int quicktime_stsc_init_audio(quicktime_
+ table->id = 1;
+ }
+
+-int quicktime_stsc_delete(quicktime_stsc_t *stsc)
++void quicktime_stsc_delete(quicktime_stsc_t *stsc)
+ {
+ if(stsc->total_entries) free(stsc->table);
+ stsc->total_entries = 0;
+ }
+
+-int quicktime_stsc_dump(quicktime_stsc_t *stsc)
++void quicktime_stsc_dump(quicktime_stsc_t *stsc)
+ {
+ int i;
+ printf(" sample to chunk\n");
+ printf(" version %d\n", stsc->version);
+- printf(" flags %d\n", stsc->flags);
+- printf(" total_entries %d\n", stsc->total_entries);
++ printf(" flags %ld\n", stsc->flags);
++ printf(" total_entries %ld\n", stsc->total_entries);
+ for(i = 0; i < stsc->total_entries; i++)
+ {
+- printf(" chunk %d samples %d id %d\n",
++ printf(" chunk %ld samples %ld id %ld\n",
+ stsc->table[i].chunk, stsc->table[i].samples, stsc->table[i].id);
+ }
+ }
+
+-int quicktime_read_stsc(quicktime_t *file, quicktime_stsc_t *stsc)
++void quicktime_read_stsc(quicktime_t *file, quicktime_stsc_t *stsc)
+ {
+ int i;
+ stsc->version = quicktime_read_char(file);
+@@ -78,7 +78,7 @@ int quicktime_read_stsc(quicktime_t *fil
+ }
+
+
+-int quicktime_write_stsc(quicktime_t *file, quicktime_stsc_t *stsc)
++void quicktime_write_stsc(quicktime_t *file, quicktime_stsc_t *stsc)
+ {
+ int i, last_same;
+ quicktime_atom_t atom;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_stsd.c b/multimedia/libmp4v2/patches/patch-lib_mp4_stsd.c
new file mode 100644
index 00000000000..ec3d70ffc43
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_stsd.c
@@ -0,0 +1,92 @@
+$NetBSD: patch-lib_mp4_stsd.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/stsd.c.orig 2017-09-25 14:55:24.131811993 +0000
++++ lib/mp4/stsd.c
+@@ -1,14 +1,14 @@
+ #include "quicktime.h"
+
+
+-int quicktime_stsd_init(quicktime_stsd_t *stsd)
++void quicktime_stsd_init(quicktime_stsd_t *stsd)
+ {
+ stsd->version = 0;
+ stsd->flags = 0;
+ stsd->total_entries = 0;
+ }
+
+-int quicktime_stsd_init_table(quicktime_stsd_t *stsd)
++void quicktime_stsd_init_table(quicktime_stsd_t *stsd)
+ {
+ if(!stsd->total_entries)
+ {
+@@ -18,7 +18,7 @@ int quicktime_stsd_init_table(quicktime_
+ }
+ }
+
+-int quicktime_stsd_init_video(quicktime_t *file,
++void quicktime_stsd_init_video(quicktime_t *file,
+ quicktime_stsd_t *stsd,
+ int frame_w,
+ int frame_h,
+@@ -37,7 +37,7 @@ int quicktime_stsd_init_video(quicktime_
+ table->ctab_id = 65535;
+ }
+
+-int quicktime_stsd_init_audio(quicktime_t *file,
++void quicktime_stsd_init_audio(quicktime_t *file,
+ quicktime_stsd_t *stsd,
+ int channels,
+ int sample_rate,
+@@ -54,7 +54,7 @@ int quicktime_stsd_init_audio(quicktime_
+ table->sample_rate = sample_rate;
+ }
+
+-int quicktime_stsd_init_hint(quicktime_t *file,
++void quicktime_stsd_init_hint(quicktime_t *file,
+ quicktime_stsd_t *stsd,
+ int maxPktSize,
+ int timeScale)
+@@ -70,7 +70,7 @@ int quicktime_stsd_init_hint(quicktime_t
+ table->tims.timeScale = timeScale;
+ }
+
+-int quicktime_stsd_delete(quicktime_stsd_t *stsd)
++void quicktime_stsd_delete(quicktime_stsd_t *stsd)
+ {
+ int i;
+ if(stsd->total_entries)
+@@ -83,13 +83,13 @@ int quicktime_stsd_delete(quicktime_stsd
+ stsd->total_entries = 0;
+ }
+
+-int quicktime_stsd_dump(void *minf_ptr, quicktime_stsd_t *stsd)
++void quicktime_stsd_dump(void *minf_ptr, quicktime_stsd_t *stsd)
+ {
+ int i;
+ printf(" sample description\n");
+ printf(" version %d\n", stsd->version);
+- printf(" flags %d\n", stsd->flags);
+- printf(" total_entries %d\n", stsd->total_entries);
++ printf(" flags %ld\n", stsd->flags);
++ printf(" total_entries %ld\n", stsd->total_entries);
+
+ for(i = 0; i < stsd->total_entries; i++)
+ {
+@@ -97,7 +97,7 @@ int quicktime_stsd_dump(void *minf_ptr,
+ }
+ }
+
+-int quicktime_read_stsd(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_t *stsd)
++void quicktime_read_stsd(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_t *stsd)
+ {
+ int i;
+ quicktime_atom_t leaf_atom;
+@@ -113,7 +113,7 @@ int quicktime_read_stsd(quicktime_t *fil
+ }
+ }
+
+-int quicktime_write_stsd(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_t *stsd)
++void quicktime_write_stsd(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_t *stsd)
+ {
+ quicktime_atom_t atom;
+ int i;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_stsdtable.c b/multimedia/libmp4v2/patches/patch-lib_mp4_stsdtable.c
new file mode 100644
index 00000000000..751550f042d
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_stsdtable.c
@@ -0,0 +1,182 @@
+$NetBSD: patch-lib_mp4_stsdtable.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/stsdtable.c.orig 2017-09-25 14:55:22.063579799 +0000
++++ lib/mp4/stsdtable.c
+@@ -1,7 +1,7 @@
+ #include "quicktime.h"
+
+
+-int quicktime_stsd_table_init(quicktime_stsd_table_t *table)
++void quicktime_stsd_table_init(quicktime_stsd_table_t *table)
+ {
+ int i;
+ table->format[0] = 'y';
+@@ -49,7 +49,7 @@ int quicktime_stsd_table_init(quicktime_
+ quicktime_esds_init(&(table->esds));
+ }
+
+-int quicktime_stsd_table_delete(quicktime_stsd_table_t *table)
++void quicktime_stsd_table_delete(quicktime_stsd_table_t *table)
+ {
+ quicktime_ctab_delete(&(table->ctab));
+ quicktime_mjqt_delete(&(table->mjqt));
+@@ -57,7 +57,7 @@ int quicktime_stsd_table_delete(quicktim
+ quicktime_esds_delete(&(table->esds));
+ }
+
+-int quicktime_stsd_table_dump(void *minf_ptr, quicktime_stsd_table_t *table)
++void quicktime_stsd_table_dump(void *minf_ptr, quicktime_stsd_table_t *table)
+ {
+ quicktime_minf_t *minf = minf_ptr;
+ printf(" format %c%c%c%c\n", table->format[0], table->format[1], table->format[2], table->format[3]);
+@@ -69,7 +69,7 @@ int quicktime_stsd_table_dump(void *minf
+ if(minf->is_hint) quicktime_stsd_hint_dump(table);
+ }
+
+-int quicktime_stsd_audio_dump(quicktime_stsd_table_t *table)
++void quicktime_stsd_audio_dump(quicktime_stsd_table_t *table)
+ {
+ printf(" version %d\n", table->version);
+ printf(" revision %d\n", table->revision);
+@@ -83,7 +83,7 @@ int quicktime_stsd_audio_dump(quicktime_
+ quicktime_esds_dump(&(table->esds));
+ }
+
+-int quicktime_stsd_video_dump(quicktime_stsd_table_t *table)
++void quicktime_stsd_video_dump(quicktime_stsd_table_t *table)
+ {
+ printf(" version %d\n", table->version);
+ printf(" revision %d\n", table->revision);
+@@ -111,7 +111,7 @@ int quicktime_stsd_video_dump(quicktime_
+ quicktime_esds_dump(&(table->esds));
+ }
+
+-int quicktime_stsd_hint_dump(quicktime_stsd_table_t *table)
++void quicktime_stsd_hint_dump(quicktime_stsd_table_t *table)
+ {
+ printf(" version %d\n", table->version);
+ printf(" revision %d\n", table->revision);
+@@ -119,7 +119,7 @@ int quicktime_stsd_hint_dump(quicktime_s
+ /* TBD dump adtab */
+ }
+
+-int quicktime_read_stsd_table(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_table_t *table)
++void quicktime_read_stsd_table(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_table_t *table)
+ {
+ quicktime_atom_t leaf_atom;
+
+@@ -137,7 +137,7 @@ int quicktime_read_stsd_table(quicktime_
+ if(minf->is_hint) quicktime_read_stsd_hint(file, table, &leaf_atom);
+ }
+
+-int quicktime_write_stsd_table(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_table_t *table)
++void quicktime_write_stsd_table(quicktime_t *file, quicktime_minf_t *minf, quicktime_stsd_table_t *table)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, table->format);
+@@ -152,7 +152,7 @@ int quicktime_write_stsd_table(quicktime
+ quicktime_atom_write_footer(file, &atom);
+ }
+
+-int quicktime_read_stsd_audio(quicktime_t *file, quicktime_stsd_table_t *table, quicktime_atom_t *parent_atom)
++void quicktime_read_stsd_audio(quicktime_t *file, quicktime_stsd_table_t *table, quicktime_atom_t *parent_atom)
+ {
+ table->version = quicktime_read_int16(file);
+ table->revision = quicktime_read_int16(file);
+@@ -177,7 +177,7 @@ int quicktime_read_stsd_audio(quicktime_
+ }
+ }
+
+-int quicktime_write_stsd_audio(quicktime_t *file, quicktime_stsd_table_t *table)
++void quicktime_write_stsd_audio(quicktime_t *file, quicktime_stsd_table_t *table)
+ {
+ if (file->use_mp4) {
+ quicktime_write_int32(file, 0);
+@@ -201,7 +201,7 @@ int quicktime_write_stsd_audio(quicktime
+ }
+ }
+
+-int quicktime_read_stsd_video(quicktime_t *file, quicktime_stsd_table_t *table, quicktime_atom_t *parent_atom)
++void quicktime_read_stsd_video(quicktime_t *file, quicktime_stsd_table_t *table, quicktime_atom_t *parent_atom)
+ {
+ quicktime_atom_t leaf_atom;
+ int len;
+@@ -264,7 +264,7 @@ int quicktime_read_stsd_video(quicktime_
+ }
+ }
+
+-int quicktime_write_stsd_video(quicktime_t *file, quicktime_stsd_table_t *table)
++void quicktime_write_stsd_video(quicktime_t *file, quicktime_stsd_table_t *table)
+ {
+ if (file->use_mp4) {
+ int i;
+@@ -314,32 +314,32 @@ int quicktime_write_stsd_video(quicktime
+ }
+ }
+
+-int quicktime_mjqt_init(quicktime_mjqt_t *mjqt)
++void quicktime_mjqt_init(quicktime_mjqt_t *mjqt)
+ {
+ }
+
+-int quicktime_mjqt_delete(quicktime_mjqt_t *mjqt)
++void quicktime_mjqt_delete(quicktime_mjqt_t *mjqt)
+ {
+ }
+
+-int quicktime_mjqt_dump(quicktime_mjqt_t *mjqt)
++void quicktime_mjqt_dump(quicktime_mjqt_t *mjqt)
+ {
+ }
+
+
+-int quicktime_mjht_init(quicktime_mjht_t *mjht)
++void quicktime_mjht_init(quicktime_mjht_t *mjht)
+ {
+ }
+
+-int quicktime_mjht_delete(quicktime_mjht_t *mjht)
++void quicktime_mjht_delete(quicktime_mjht_t *mjht)
+ {
+ }
+
+-int quicktime_mjht_dump(quicktime_mjht_t *mjht)
++void quicktime_mjht_dump(quicktime_mjht_t *mjht)
+ {
+ }
+
+-int quicktime_read_stsd_hint(quicktime_t *file, quicktime_stsd_table_t *table, quicktime_atom_t *parent_atom)
++void quicktime_read_stsd_hint(quicktime_t *file, quicktime_stsd_table_t *table, quicktime_atom_t *parent_atom)
+ {
+ quicktime_atom_t leaf_atom;
+
+@@ -357,7 +357,7 @@ int quicktime_read_stsd_hint(quicktime_t
+ }
+ }
+
+-int quicktime_write_stsd_hint(quicktime_t *file, quicktime_stsd_table_t *table)
++void quicktime_write_stsd_hint(quicktime_t *file, quicktime_stsd_table_t *table)
+ {
+ quicktime_write_int16(file, table->version);
+ quicktime_write_int16(file, table->revision);
+@@ -365,17 +365,17 @@ int quicktime_write_stsd_hint(quicktime_
+ quicktime_write_tims(file, &(table->tims));
+ }
+
+-int quicktime_tims_init(quicktime_tims_t *tims)
++void quicktime_tims_init(quicktime_tims_t *tims)
+ {
+ tims->timeScale = 0;
+ }
+
+-int quicktime_read_tims(quicktime_t *file, quicktime_tims_t *tims)
++void quicktime_read_tims(quicktime_t *file, quicktime_tims_t *tims)
+ {
+ tims->timeScale = quicktime_read_int32(file);
+ }
+
+-int quicktime_write_tims(quicktime_t *file, quicktime_tims_t *tims)
++void quicktime_write_tims(quicktime_t *file, quicktime_tims_t *tims)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_stss.c b/multimedia/libmp4v2/patches/patch-lib_mp4_stss.c
new file mode 100644
index 00000000000..141d51e235e
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_stss.c
@@ -0,0 +1,74 @@
+$NetBSD: patch-lib_mp4_stss.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/stss.c.orig 2017-09-25 14:55:20.105351068 +0000
++++ lib/mp4/stss.c
+@@ -1,7 +1,7 @@
+ #include "quicktime.h"
+
+
+-int quicktime_stss_init(quicktime_stss_t *stss)
++void quicktime_stss_init(quicktime_stss_t *stss)
+ {
+ stss->version = 0;
+ stss->flags = 0;
+@@ -9,7 +9,7 @@ int quicktime_stss_init(quicktime_stss_t
+ stss->entries_allocated = 0;
+ }
+
+-int quicktime_stss_init_common(quicktime_t *file, quicktime_stss_t *stss)
++void quicktime_stss_init_common(quicktime_t *file, quicktime_stss_t *stss)
+ {
+ if (stss->entries_allocated == 0) {
+ stss->entries_allocated = 100;
+@@ -18,27 +18,27 @@ int quicktime_stss_init_common(quicktime
+ }
+ }
+
+-int quicktime_stss_delete(quicktime_stss_t *stss)
++void quicktime_stss_delete(quicktime_stss_t *stss)
+ {
+ if(stss->total_entries)
+ free(stss->table);
+ stss->total_entries = 0;
+ }
+
+-int quicktime_stss_dump(quicktime_stss_t *stss)
++void quicktime_stss_dump(quicktime_stss_t *stss)
+ {
+ int i;
+ printf(" sync sample\n");
+ printf(" version %d\n", stss->version);
+- printf(" flags %d\n", stss->flags);
+- printf(" total_entries %d\n", stss->total_entries);
++ printf(" flags %ld\n", stss->flags);
++ printf(" total_entries %ld\n", stss->total_entries);
+ for(i = 0; i < stss->total_entries; i++)
+ {
+- printf(" sample %u\n", stss->table[i].sample);
++ printf(" sample %ld\n", stss->table[i].sample);
+ }
+ }
+
+-int quicktime_read_stss(quicktime_t *file, quicktime_stss_t *stss)
++void quicktime_read_stss(quicktime_t *file, quicktime_stss_t *stss)
+ {
+ int i;
+ stss->version = quicktime_read_char(file);
+@@ -53,7 +53,7 @@ int quicktime_read_stss(quicktime_t *fil
+ }
+
+
+-int quicktime_write_stss(quicktime_t *file, quicktime_stss_t *stss)
++void quicktime_write_stss(quicktime_t *file, quicktime_stss_t *stss)
+ {
+ int i;
+ quicktime_atom_t atom;
+@@ -74,7 +74,7 @@ int quicktime_write_stss(quicktime_t *fi
+ }
+ }
+
+-int quicktime_update_stss(quicktime_stss_t *stss, long sample)
++void quicktime_update_stss(quicktime_stss_t *stss, long sample)
+ {
+ if (stss->total_entries >= stss->entries_allocated) {
+ stss->entries_allocated *= 2;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_stsz.c b/multimedia/libmp4v2/patches/patch-lib_mp4_stsz.c
new file mode 100644
index 00000000000..3290dddf0e4
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_stsz.c
@@ -0,0 +1,89 @@
+$NetBSD: patch-lib_mp4_stsz.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/stsz.c.orig 2017-09-25 14:55:18.019052073 +0000
++++ lib/mp4/stsz.c
+@@ -2,7 +2,7 @@
+
+
+
+-int quicktime_stsz_init(quicktime_stsz_t *stsz)
++void quicktime_stsz_init(quicktime_stsz_t *stsz)
+ {
+ stsz->version = 0;
+ stsz->flags = 0;
+@@ -11,7 +11,7 @@ int quicktime_stsz_init(quicktime_stsz_t
+ stsz->entries_allocated = 0;
+ }
+
+-int quicktime_stsz_init_video(quicktime_t *file, quicktime_stsz_t *stsz)
++void quicktime_stsz_init_video(quicktime_t *file, quicktime_stsz_t *stsz)
+ {
+ stsz->sample_size = 0;
+ if(!stsz->entries_allocated)
+@@ -22,14 +22,14 @@ int quicktime_stsz_init_video(quicktime_
+ }
+ }
+
+-int quicktime_stsz_init_audio(quicktime_t *file, quicktime_stsz_t *stsz, int sample_size)
++void quicktime_stsz_init_audio(quicktime_t *file, quicktime_stsz_t *stsz, int sample_size)
+ {
+ stsz->sample_size = sample_size; /* if == 0, then use table */
+ stsz->total_entries = 0; /* set this when closing */
+ stsz->entries_allocated = 0;
+ }
+
+-int quicktime_stsz_delete(quicktime_stsz_t *stsz)
++void quicktime_stsz_delete(quicktime_stsz_t *stsz)
+ {
+ if(!stsz->sample_size && stsz->total_entries)
+ free(stsz->table);
+@@ -37,25 +37,25 @@ int quicktime_stsz_delete(quicktime_stsz
+ stsz->entries_allocated = 0;
+ }
+
+-int quicktime_stsz_dump(quicktime_stsz_t *stsz)
++void quicktime_stsz_dump(quicktime_stsz_t *stsz)
+ {
+ int i;
+ printf(" sample size\n");
+ printf(" version %d\n", stsz->version);
+- printf(" flags %d\n", stsz->flags);
+- printf(" sample_size %d\n", stsz->sample_size);
+- printf(" total_entries %d\n", stsz->total_entries);
++ printf(" flags %ld\n", stsz->flags);
++ printf(" sample_size %ld\n", stsz->sample_size);
++ printf(" total_entries %ld\n", stsz->total_entries);
+
+ if(!stsz->sample_size)
+ {
+ for(i = 0; i < stsz->total_entries; i++)
+ {
+- printf(" sample_size %d\n", stsz->table[i].size);
++ printf(" sample_size %ld\n", stsz->table[i].size);
+ }
+ }
+ }
+
+-int quicktime_read_stsz(quicktime_t *file, quicktime_stsz_t *stsz)
++void quicktime_read_stsz(quicktime_t *file, quicktime_stsz_t *stsz)
+ {
+ int i;
+ stsz->version = quicktime_read_char(file);
+@@ -73,7 +73,7 @@ int quicktime_read_stsz(quicktime_t *fil
+ }
+ }
+
+-int quicktime_write_stsz(quicktime_t *file, quicktime_stsz_t *stsz)
++void quicktime_write_stsz(quicktime_t *file, quicktime_stsz_t *stsz)
+ {
+ int i, result;
+ quicktime_atom_t atom;
+@@ -116,7 +116,7 @@ int quicktime_write_stsz(quicktime_t *fi
+ quicktime_atom_write_footer(file, &atom);
+ }
+
+-int quicktime_update_stsz(quicktime_stsz_t *stsz, long sample, long sample_size)
++void quicktime_update_stsz(quicktime_stsz_t *stsz, long sample, long sample_size)
+ {
+ quicktime_stsz_table_t *new_table;
+ int i;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_stts.c b/multimedia/libmp4v2/patches/patch-lib_mp4_stts.c
new file mode 100644
index 00000000000..9e5ec5f47e1
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_stts.c
@@ -0,0 +1,99 @@
+$NetBSD: patch-lib_mp4_stts.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/stts.c.orig 2017-09-25 14:55:16.067763826 +0000
++++ lib/mp4/stts.c
+@@ -2,7 +2,7 @@
+
+
+
+-int quicktime_stts_init(quicktime_stts_t *stts)
++void quicktime_stts_init(quicktime_stts_t *stts)
+ {
+ stts->version = 0;
+ stts->flags = 0;
+@@ -10,7 +10,7 @@ int quicktime_stts_init(quicktime_stts_t
+ stts->entries_allocated = 0;
+ }
+
+-int quicktime_stts_init_table(quicktime_stts_t *stts)
++void quicktime_stts_init_table(quicktime_stts_t *stts)
+ {
+ if(!stts->entries_allocated)
+ {
+@@ -21,7 +21,7 @@ int quicktime_stts_init_table(quicktime_
+ }
+ }
+
+-int quicktime_stts_init_video(quicktime_t *file, quicktime_stts_t *stts, int time_scale, float frame_rate)
++void quicktime_stts_init_video(quicktime_t *file, quicktime_stts_t *stts, int time_scale, float frame_rate)
+ {
+ quicktime_stts_table_t *table;
+ quicktime_stts_init_table(stts);
+@@ -31,7 +31,7 @@ int quicktime_stts_init_video(quicktime_
+ table->sample_duration = time_scale / frame_rate;
+ }
+
+-int quicktime_stts_init_audio(quicktime_t *file, quicktime_stts_t *stts, int time_scale, int sample_duration)
++void quicktime_stts_init_audio(quicktime_t *file, quicktime_stts_t *stts, int time_scale, int sample_duration)
+ {
+ quicktime_stts_table_t *table;
+ quicktime_stts_init_table(stts);
+@@ -41,7 +41,7 @@ int quicktime_stts_init_audio(quicktime_
+ table->sample_duration = sample_duration;
+ }
+
+-int quicktime_stts_init_hint(quicktime_t *file, quicktime_stts_t *stts, int sample_duration)
++void quicktime_stts_init_hint(quicktime_t *file, quicktime_stts_t *stts, int sample_duration)
+ {
+ quicktime_stts_table_t *table;
+ quicktime_stts_init_table(stts);
+@@ -51,26 +51,26 @@ int quicktime_stts_init_hint(quicktime_t
+ table->sample_duration = sample_duration;
+ }
+
+-int quicktime_stts_delete(quicktime_stts_t *stts)
++void quicktime_stts_delete(quicktime_stts_t *stts)
+ {
+ if(stts->total_entries) free(stts->table);
+ stts->total_entries = 0;
+ }
+
+-int quicktime_stts_dump(quicktime_stts_t *stts)
++void quicktime_stts_dump(quicktime_stts_t *stts)
+ {
+ int i;
+ printf(" time to sample\n");
+ printf(" version %d\n", stts->version);
+- printf(" flags %d\n", stts->flags);
+- printf(" total_entries %d\n", stts->total_entries);
++ printf(" flags %ld\n", stts->flags);
++ printf(" total_entries %ld\n", stts->total_entries);
+ for(i = 0; i < stts->total_entries; i++)
+ {
+ printf(" count %ld duration %ld\n", stts->table[i].sample_count, stts->table[i].sample_duration);
+ }
+ }
+
+-int quicktime_read_stts(quicktime_t *file, quicktime_stts_t *stts)
++void quicktime_read_stts(quicktime_t *file, quicktime_stts_t *stts)
+ {
+ int i;
+ stts->version = quicktime_read_char(file);
+@@ -85,7 +85,7 @@ int quicktime_read_stts(quicktime_t *fil
+ }
+ }
+
+-int quicktime_write_stts(quicktime_t *file, quicktime_stts_t *stts)
++void quicktime_write_stts(quicktime_t *file, quicktime_stts_t *stts)
+ {
+ int i;
+ quicktime_atom_t atom;
+@@ -102,7 +102,7 @@ int quicktime_write_stts(quicktime_t *fi
+ quicktime_atom_write_footer(file, &atom);
+ }
+
+-int quicktime_update_stts(quicktime_stts_t *stts, long sample_duration)
++void quicktime_update_stts(quicktime_stts_t *stts, long sample_duration)
+ {
+ if (sample_duration == stts->table[stts->total_entries-1].sample_duration) {
+ stts->table[stts->total_entries-1].sample_count++;
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_tkhd.c b/multimedia/libmp4v2/patches/patch-lib_mp4_tkhd.c
new file mode 100644
index 00000000000..e60a5394ad3
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_tkhd.c
@@ -0,0 +1,80 @@
+$NetBSD: patch-lib_mp4_tkhd.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/tkhd.c.orig 2017-09-25 14:55:14.099688587 +0000
++++ lib/mp4/tkhd.c
+@@ -8,7 +8,7 @@ int quicktime_tkhd_init(quicktime_tkhd_t
+ tkhd->flags = 15;
+ tkhd->creation_time = quicktime_current_time();
+ tkhd->modification_time = quicktime_current_time();
+- tkhd->track_id;
++ tkhd->track_id = 0;
+ tkhd->reserved1 = 0;
+ tkhd->duration = 0; /* need to set this when closing */
+ for(i = 0; i < 8; i++) tkhd->reserved2[i] = 0;
+@@ -25,13 +25,13 @@ int quicktime_tkhd_init(quicktime_tkhd_t
+ return 0;
+ }
+
+-int quicktime_tkhd_init_audio(quicktime_t *file,
++void quicktime_tkhd_init_audio(quicktime_t *file,
+ quicktime_tkhd_t *tkhd)
+ {
+ tkhd->is_audio = TRUE;
+ }
+
+-int quicktime_tkhd_init_video(quicktime_t *file,
++void quicktime_tkhd_init_video(quicktime_t *file,
+ quicktime_tkhd_t *tkhd,
+ int frame_w,
+ int frame_h)
+@@ -42,7 +42,7 @@ int quicktime_tkhd_init_video(quicktime_
+ tkhd->volume = 0;
+ }
+
+-int quicktime_tkhd_init_hint(quicktime_t *file,
++void quicktime_tkhd_init_hint(quicktime_t *file,
+ quicktime_tkhd_t *tkhd)
+ {
+ tkhd->is_hint = TRUE;
+@@ -56,13 +56,13 @@ int quicktime_tkhd_delete(quicktime_tkhd
+ return 0;
+ }
+
+-int quicktime_tkhd_dump(quicktime_tkhd_t *tkhd)
++void quicktime_tkhd_dump(quicktime_tkhd_t *tkhd)
+ {
+ printf(" track header\n");
+ printf(" version %d\n", tkhd->version);
+ printf(" flags %ld\n", tkhd->flags);
+- printf(" creation_time %u\n", tkhd->creation_time);
+- printf(" modification_time %u\n", tkhd->modification_time);
++ printf(" creation_time %lu\n", tkhd->creation_time);
++ printf(" modification_time %lu\n", tkhd->modification_time);
+ printf(" track_id %d\n", tkhd->track_id);
+ printf(" reserved1 %ld\n", tkhd->reserved1);
+ printf(" duration %ld\n", tkhd->duration);
+@@ -70,13 +70,13 @@ int quicktime_tkhd_dump(quicktime_tkhd_t
+ printf(" layer %d\n", tkhd->layer);
+ printf(" alternate_group %d\n", tkhd->alternate_group);
+ printf(" volume %f\n", tkhd->volume);
+- printf(" reserved3 %d\n", tkhd->reserved3);
++ printf(" reserved3 %ld\n", tkhd->reserved3);
+ quicktime_matrix_dump(&(tkhd->matrix));
+ printf(" track_width %f\n", tkhd->track_width);
+ printf(" track_height %f\n", tkhd->track_height);
+ }
+
+-int quicktime_read_tkhd(quicktime_t *file, quicktime_tkhd_t *tkhd)
++void quicktime_read_tkhd(quicktime_t *file, quicktime_tkhd_t *tkhd)
+ {
+ tkhd->version = quicktime_read_char(file);
+ tkhd->flags = quicktime_read_int24(file);
+@@ -95,7 +95,7 @@ int quicktime_read_tkhd(quicktime_t *fil
+ tkhd->track_height = quicktime_read_fixed32(file);
+ }
+
+-int quicktime_write_tkhd(quicktime_t *file, quicktime_tkhd_t *tkhd)
++void quicktime_write_tkhd(quicktime_t *file, quicktime_tkhd_t *tkhd)
+ {
+ quicktime_atom_t atom;
+ quicktime_atom_write_header(file, &atom, "tkhd");
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_tmax.c b/multimedia/libmp4v2/patches/patch-lib_mp4_tmax.c
new file mode 100644
index 00000000000..1052cc68b2e
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_tmax.c
@@ -0,0 +1,38 @@
+$NetBSD: patch-lib_mp4_tmax.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/tmax.c.orig 2017-09-25 14:55:12.027621878 +0000
++++ lib/mp4/tmax.c
+@@ -22,27 +22,27 @@
+ #include "quicktime.h"
+
+
+-int quicktime_tmax_init(quicktime_tmax_t *tmax)
++void quicktime_tmax_init(quicktime_tmax_t *tmax)
+ {
+ tmax->milliSecs = 0;
+ }
+
+-int quicktime_tmax_delete(quicktime_tmax_t *tmax)
++void quicktime_tmax_delete(quicktime_tmax_t *tmax)
+ {
+ }
+
+-int quicktime_tmax_dump(quicktime_tmax_t *tmax)
++void quicktime_tmax_dump(quicktime_tmax_t *tmax)
+ {
+ printf(" max relative xmit time\n");
+- printf(" milliSecs %lu\n", tmax->milliSecs);
++ printf(" milliSecs %u\n", (unsigned)tmax->milliSecs);
+ }
+
+-int quicktime_read_tmax(quicktime_t *file, quicktime_tmax_t *tmax)
++void quicktime_read_tmax(quicktime_t *file, quicktime_tmax_t *tmax)
+ {
+ tmax->milliSecs = quicktime_read_int32(file);
+ }
+
+-int quicktime_write_tmax(quicktime_t *file, quicktime_tmax_t *tmax)
++void quicktime_write_tmax(quicktime_t *file, quicktime_tmax_t *tmax)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_tmin.c b/multimedia/libmp4v2/patches/patch-lib_mp4_tmin.c
new file mode 100644
index 00000000000..24202dec290
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_tmin.c
@@ -0,0 +1,38 @@
+$NetBSD: patch-lib_mp4_tmin.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/tmin.c.orig 2017-09-25 14:55:09.903663456 +0000
++++ lib/mp4/tmin.c
+@@ -22,27 +22,27 @@
+ #include "quicktime.h"
+
+
+-int quicktime_tmin_init(quicktime_tmin_t *tmin)
++void quicktime_tmin_init(quicktime_tmin_t *tmin)
+ {
+ tmin->milliSecs = 0;
+ }
+
+-int quicktime_tmin_delete(quicktime_tmin_t *tmin)
++void quicktime_tmin_delete(quicktime_tmin_t *tmin)
+ {
+ }
+
+-int quicktime_tmin_dump(quicktime_tmin_t *tmin)
++void quicktime_tmin_dump(quicktime_tmin_t *tmin)
+ {
+ printf(" min relative xmit time\n");
+- printf(" milliSecs %lu\n", tmin->milliSecs);
++ printf(" milliSecs %u\n", (unsigned)tmin->milliSecs);
+ }
+
+-int quicktime_read_tmin(quicktime_t *file, quicktime_tmin_t *tmin)
++void quicktime_read_tmin(quicktime_t *file, quicktime_tmin_t *tmin)
+ {
+ tmin->milliSecs = quicktime_read_int32(file);
+ }
+
+-int quicktime_write_tmin(quicktime_t *file, quicktime_tmin_t *tmin)
++void quicktime_write_tmin(quicktime_t *file, quicktime_tmin_t *tmin)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_tpyl.c b/multimedia/libmp4v2/patches/patch-lib_mp4_tpyl.c
new file mode 100644
index 00000000000..a7ac42e6143
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_tpyl.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-lib_mp4_tpyl.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/tpyl.c.orig 2017-09-25 14:55:07.879577256 +0000
++++ lib/mp4/tpyl.c
+@@ -22,27 +22,27 @@
+ #include "quicktime.h"
+
+
+-int quicktime_tpyl_init(quicktime_tpyl_t *tpyl)
++void quicktime_tpyl_init(quicktime_tpyl_t *tpyl)
+ {
+ tpyl->numBytes = 0;
+ }
+
+-int quicktime_tpyl_delete(quicktime_tpyl_t *tpyl)
++void quicktime_tpyl_delete(quicktime_tpyl_t *tpyl)
+ {
+ }
+
+-int quicktime_tpyl_dump(quicktime_tpyl_t *tpyl)
++void quicktime_tpyl_dump(quicktime_tpyl_t *tpyl)
+ {
+ printf(" total RTP payload bytes\n");
+ printf(" numBytes "U64"\n", tpyl->numBytes);
+ }
+
+-int quicktime_read_tpyl(quicktime_t *file, quicktime_tpyl_t *tpyl)
++void quicktime_read_tpyl(quicktime_t *file, quicktime_tpyl_t *tpyl)
+ {
+ tpyl->numBytes = quicktime_read_int64(file);
+ }
+
+-int quicktime_write_tpyl(quicktime_t *file, quicktime_tpyl_t *tpyl)
++void quicktime_write_tpyl(quicktime_t *file, quicktime_tpyl_t *tpyl)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_trpy.c b/multimedia/libmp4v2/patches/patch-lib_mp4_trpy.c
new file mode 100644
index 00000000000..1551ac04eb1
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_trpy.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-lib_mp4_trpy.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/trpy.c.orig 2017-09-25 14:55:03.530480720 +0000
++++ lib/mp4/trpy.c
+@@ -22,27 +22,27 @@
+ #include "quicktime.h"
+
+
+-int quicktime_trpy_init(quicktime_trpy_t *trpy)
++void quicktime_trpy_init(quicktime_trpy_t *trpy)
+ {
+ trpy->numBytes = 0;
+ }
+
+-int quicktime_trpy_delete(quicktime_trpy_t *trpy)
++void quicktime_trpy_delete(quicktime_trpy_t *trpy)
+ {
+ }
+
+-int quicktime_trpy_dump(quicktime_trpy_t *trpy)
++void quicktime_trpy_dump(quicktime_trpy_t *trpy)
+ {
+ printf(" total RTP bytes\n");
+ printf(" numBytes "U64"\n", trpy->numBytes);
+ }
+
+-int quicktime_read_trpy(quicktime_t *file, quicktime_trpy_t *trpy)
++void quicktime_read_trpy(quicktime_t *file, quicktime_trpy_t *trpy)
+ {
+ trpy->numBytes = quicktime_read_int64(file);
+ }
+
+-int quicktime_write_trpy(quicktime_t *file, quicktime_trpy_t *trpy)
++void quicktime_write_trpy(quicktime_t *file, quicktime_trpy_t *trpy)
+ {
+ quicktime_atom_t atom;
+
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_udta.c b/multimedia/libmp4v2/patches/patch-lib_mp4_udta.c
index 58c1738fe3e..6ff8be1ca4a 100644
--- a/multimedia/libmp4v2/patches/patch-lib_mp4_udta.c
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_udta.c
@@ -1,9 +1,39 @@
-$NetBSD: patch-lib_mp4_udta.c,v 1.1 2017/05/06 18:12:00 maya Exp $
+$NetBSD: patch-lib_mp4_udta.c,v 1.2 2017/09/25 22:30:06 joerg Exp $
Fix return type. we're not returning anything.
--- lib/mp4/udta.c.orig 2001-08-30 16:23:13.000000000 +0000
+++ lib/mp4/udta.c
+@@ -38,7 +38,7 @@ int quicktime_udta_delete(quicktime_udta
+ return 0;
+ }
+
+-int quicktime_udta_dump(quicktime_udta_t *udta)
++void quicktime_udta_dump(quicktime_udta_t *udta)
+ {
+ printf(" user data (udta)\n");
+ if(udta->copyright_len) printf(" copyright -> %s\n", udta->copyright);
+@@ -64,17 +64,17 @@ int quicktime_read_udta(quicktime_t *fil
+
+ quicktime_atom_read_header(file, &leaf_atom);
+
+- if(quicktime_atom_is(&leaf_atom, "©cpy"))
++ if(quicktime_atom_is(&leaf_atom, "\xa9""cpy"))
+ {
+ result += quicktime_read_udta_string(file, &(udta->copyright), &(udta->copyright_len));
+ }
+ else
+- if(quicktime_atom_is(&leaf_atom, "©nam"))
++ if(quicktime_atom_is(&leaf_atom, "\xa9nam"))
+ {
+ result += quicktime_read_udta_string(file, &(udta->name), &(udta->name_len));
+ }
+ else
+- if(quicktime_atom_is(&leaf_atom, "©inf"))
++ if(quicktime_atom_is(&leaf_atom, "\xa9inf"))
+ {
+ result += quicktime_read_udta_string(file, &(udta->info), &(udta->info_len));
+ }
@@ -88,7 +88,7 @@ int quicktime_read_udta(quicktime_t *fil
return result;
}
@@ -13,3 +43,28 @@ Fix return type. we're not returning anything.
{
quicktime_atom_t atom, subatom;
+@@ -112,21 +112,21 @@ int quicktime_write_udta(quicktime_t *fi
+
+ if(udta->copyright_len)
+ {
+- quicktime_atom_write_header(file, &subatom, "©cpy");
++ quicktime_atom_write_header(file, &subatom, "\xa9""cpy");
+ quicktime_write_udta_string(file, udta->copyright, udta->copyright_len);
+ quicktime_atom_write_footer(file, &subatom);
+ }
+
+ if(udta->name_len && !file->use_mp4)
+ {
+- quicktime_atom_write_header(file, &subatom, "©nam");
++ quicktime_atom_write_header(file, &subatom, "\xa9nam");
+ quicktime_write_udta_string(file, udta->name, udta->name_len);
+ quicktime_atom_write_footer(file, &subatom);
+ }
+
+ if(udta->info_len && !file->use_mp4)
+ {
+- quicktime_atom_write_header(file, &subatom, "©inf");
++ quicktime_atom_write_header(file, &subatom, "\xa9inf");
+ quicktime_write_udta_string(file, udta->info, udta->info_len);
+ quicktime_atom_write_footer(file, &subatom);
+ }
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_util.c b/multimedia/libmp4v2/patches/patch-lib_mp4_util.c
new file mode 100644
index 00000000000..c88205afa8a
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_util.c
@@ -0,0 +1,49 @@
+$NetBSD: patch-lib_mp4_util.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/util.c.orig 2017-09-25 14:55:01.074628967 +0000
++++ lib/mp4/util.c
+@@ -131,14 +131,14 @@ int quicktime_test_position(quicktime_t
+ return 0;
+ }
+
+-int quicktime_read_pascal(quicktime_t *file, char *data)
++void quicktime_read_pascal(quicktime_t *file, char *data)
+ {
+ char len = quicktime_read_char(file);
+ quicktime_read_data(file, data, len);
+ data[len] = 0;
+ }
+
+-int quicktime_write_pascal(quicktime_t *file, char *data)
++void quicktime_write_pascal(quicktime_t *file, char *data)
+ {
+ char len = strlen(data);
+ quicktime_write_data(file, &len, 1);
+@@ -326,7 +326,7 @@ int quicktime_write_char(quicktime_t *fi
+ return quicktime_write_data(file, &x, 1);
+ }
+
+-int quicktime_read_char32(quicktime_t *file, char *string)
++void quicktime_read_char32(quicktime_t *file, char *string)
+ {
+ quicktime_read_data(file, string, 4);
+ /* fread(string, 4, 1, file->stream); */
+@@ -344,7 +344,7 @@ int quicktime_set_position(quicktime_t *
+ /* fseek(file->stream, position, SEEK_SET); */
+ }
+
+-int quicktime_copy_char32(char *output, char *input)
++void quicktime_copy_char32(char *output, char *input)
+ {
+ *output++ = *input++;
+ *output++ = *input++;
+@@ -352,8 +352,7 @@ int quicktime_copy_char32(char *output,
+ *output = *input;
+ }
+
+-
+-int quicktime_print_chars(char *desc, char *input, int len)
++void quicktime_print_chars(char *desc, char *input, int len)
+ {
+ int i;
+ printf("%s", desc);
diff --git a/multimedia/libmp4v2/patches/patch-lib_mp4_vmhd.c b/multimedia/libmp4v2/patches/patch-lib_mp4_vmhd.c
new file mode 100644
index 00000000000..2645b76ff5d
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-lib_mp4_vmhd.c
@@ -0,0 +1,56 @@
+$NetBSD: patch-lib_mp4_vmhd.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- lib/mp4/vmhd.c.orig 2017-09-25 14:54:58.634007390 +0000
++++ lib/mp4/vmhd.c
+@@ -1,7 +1,7 @@
+ #include "quicktime.h"
+
+
+-int quicktime_vmhd_init(quicktime_vmhd_t *vmhd)
++void quicktime_vmhd_init(quicktime_vmhd_t *vmhd)
+ {
+ vmhd->version = 0;
+ vmhd->flags = 1;
+@@ -11,7 +11,7 @@ int quicktime_vmhd_init(quicktime_vmhd_t
+ vmhd->opcolor[2] = 32768;
+ }
+
+-int quicktime_vmhd_init_video(quicktime_t *file,
++void quicktime_vmhd_init_video(quicktime_t *file,
+ quicktime_vmhd_t *vmhd,
+ int frame_w,
+ int frame_h,
+@@ -19,20 +19,20 @@ int quicktime_vmhd_init_video(quicktime_
+ {
+ }
+
+-int quicktime_vmhd_delete(quicktime_vmhd_t *vmhd)
++void quicktime_vmhd_delete(quicktime_vmhd_t *vmhd)
+ {
+ }
+
+-int quicktime_vmhd_dump(quicktime_vmhd_t *vmhd)
++void quicktime_vmhd_dump(quicktime_vmhd_t *vmhd)
+ {
+ printf(" video media header\n");
+ printf(" version %d\n", vmhd->version);
+- printf(" flags %d\n", vmhd->flags);
++ printf(" flags %ld\n", vmhd->flags);
+ printf(" graphics_mode %d\n", vmhd->graphics_mode);
+ printf(" opcolor %d %d %d\n", vmhd->opcolor[0], vmhd->opcolor[1], vmhd->opcolor[2]);
+ }
+
+-int quicktime_read_vmhd(quicktime_t *file, quicktime_vmhd_t *vmhd)
++void quicktime_read_vmhd(quicktime_t *file, quicktime_vmhd_t *vmhd)
+ {
+ int i;
+ vmhd->version = quicktime_read_char(file);
+@@ -42,7 +42,7 @@ int quicktime_read_vmhd(quicktime_t *fil
+ vmhd->opcolor[i] = quicktime_read_int16(file);
+ }
+
+-int quicktime_write_vmhd(quicktime_t *file, quicktime_vmhd_t *vmhd)
++void quicktime_write_vmhd(quicktime_t *file, quicktime_vmhd_t *vmhd)
+ {
+ quicktime_atom_t atom;
+ int i;
diff --git a/multimedia/libmp4v2/patches/patch-server_util_avidump_avidump.c b/multimedia/libmp4v2/patches/patch-server_util_avidump_avidump.c
new file mode 100644
index 00000000000..fc75e2ce937
--- /dev/null
+++ b/multimedia/libmp4v2/patches/patch-server_util_avidump_avidump.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-server_util_avidump_avidump.c,v 1.1 2017/09/25 22:30:06 joerg Exp $
+
+--- server/util/avidump/avidump.c.orig 2017-09-25 16:57:46.071322771 +0000
++++ server/util/avidump/avidump.c
+@@ -52,7 +52,7 @@ static struct {
+ { NULL, 0},
+ };
+
+-static dump_video_sizes (avi_t* aviFile)
++static void dump_video_sizes (avi_t* aviFile)
+ {
+ long frames = AVI_video_frames(aviFile);
+ long ix;