-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
packages/ffmpeg-av-windows/ffmpeg-av-windows.1.2.1/files/patches/strndup.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
diff --git a/av/av_stubs.c b/av/av_stubs.c | ||
index ca9fbdf..90c0888 100644 | ||
--- a/av/av_stubs.c | ||
+++ b/av/av_stubs.c | ||
@@ -24,6 +24,7 @@ | ||
#include <libavutil/opt.h> | ||
#include <libavutil/parseutils.h> | ||
#include <libavutil/timestamp.h> | ||
+#include <libavutil/mem.h> | ||
|
||
#include "av_stubs.h" | ||
#include "avcodec_stubs.h" | ||
@@ -644,7 +645,7 @@ CAMLprim value ocaml_av_find_input_format(value _short_name) { | ||
CAMLparam1(_short_name); | ||
CAMLlocal1(ret); | ||
char *short_name = | ||
- strndup(String_val(_short_name), caml_string_length(_short_name)); | ||
+ av_strndup(String_val(_short_name), caml_string_length(_short_name)); | ||
|
||
if (!short_name) | ||
caml_raise_out_of_memory(); | ||
@@ -776,7 +777,7 @@ CAMLprim value ocaml_av_open_input(value _url, value _format, value _interrupt, | ||
} | ||
|
||
if (ulen > 0) | ||
- url = strndup(String_val(_url), ulen); | ||
+ url = av_strndup(String_val(_url), ulen); | ||
|
||
if (_format != Val_none) | ||
format = InputFormat_val(Some_val(_format)); | ||
@@ -1351,13 +1352,13 @@ CAMLprim value ocaml_av_output_format_guess(value _short_name, value _filename, | ||
|
||
if (caml_string_length(_short_name) > 0) { | ||
short_name = | ||
- strndup(String_val(_short_name), caml_string_length(_short_name)); | ||
+ av_strndup(String_val(_short_name), caml_string_length(_short_name)); | ||
if (!short_name) | ||
caml_raise_out_of_memory(); | ||
}; | ||
|
||
if (caml_string_length(_filename) > 0) { | ||
- filename = strndup(String_val(_filename), caml_string_length(_filename)); | ||
+ filename = av_strndup(String_val(_filename), caml_string_length(_filename)); | ||
if (!filename) { | ||
if (short_name) | ||
free(short_name); | ||
@@ -1366,7 +1367,7 @@ CAMLprim value ocaml_av_output_format_guess(value _short_name, value _filename, | ||
} | ||
|
||
if (caml_string_length(_mime) > 0) { | ||
- mime = strndup(String_val(_mime), caml_string_length(_mime)); | ||
+ mime = av_strndup(String_val(_mime), caml_string_length(_mime)); | ||
if (!mime) { | ||
if (short_name) | ||
free(short_name); | ||
@@ -1553,7 +1554,7 @@ CAMLprim value ocaml_av_open_output(value _interrupt, value _format, | ||
CAMLparam3(_interrupt, _filename, _opts); | ||
CAMLlocal3(ans, ret, unused); | ||
char *filename = | ||
- strndup(String_val(_filename), caml_string_length(_filename)); | ||
+ av_strndup(String_val(_filename), caml_string_length(_filename)); | ||
avioformat_const AVOutputFormat *format = NULL; | ||
AVDictionary *options = NULL; | ||
char *key, *val; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/ffmpeg-avfilter-windows/ffmpeg-avfilter-windows.1.2.1/files/patches/strndup.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/avfilter/avfilter_stubs.c b/avfilter/avfilter_stubs.c | ||
index 892bca4..63a48ab 100644 | ||
--- a/avfilter/avfilter_stubs.c | ||
+++ b/avfilter/avfilter_stubs.c | ||
@@ -14,6 +14,7 @@ | ||
#include <libavfilter/avfilter.h> | ||
#include <libavfilter/buffersink.h> | ||
#include <libavfilter/buffersrc.h> | ||
+#include <libavutil/mem.h> | ||
|
||
#define AvFilterContext_val(v) (*(AVFilterContext **)Data_abstract_val(v)) | ||
|
||
@@ -178,12 +179,12 @@ CAMLprim value ocaml_avfilter_create_filter(value _args, value _instance_name, | ||
caml_raise_not_found(); | ||
|
||
name = | ||
- strndup(String_val(_instance_name), caml_string_length(_instance_name)); | ||
+ av_strndup(String_val(_instance_name), caml_string_length(_instance_name)); | ||
if (!name) | ||
caml_raise_out_of_memory(); | ||
|
||
if (_args != Val_none) { | ||
- args = strndup(String_val(Some_val(_args)), | ||
+ args = av_strndup(String_val(Some_val(_args)), | ||
caml_string_length(Some_val(_args))); | ||
|
||
if (!args) { | ||
@@ -309,7 +310,7 @@ CAMLprim value ocaml_avfilter_parse(value _inputs, value _outputs, | ||
append_avfilter_in_out(&outputs, name, filter_ctx, idx); | ||
} | ||
|
||
- filters = strndup(String_val(_filters), caml_string_length(_filters)); | ||
+ filters = av_strndup(String_val(_filters), caml_string_length(_filters)); | ||
|
||
if (!filters) { | ||
if (inputs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/ffmpeg-avutil-windows/ffmpeg-avutil-windows.1.2.1/files/patches/strndup.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git a/avutil/avutil_stubs.c b/avutil/avutil_stubs.c | ||
index 78d2f8d..6e99a7d 100644 | ||
--- a/avutil/avutil_stubs.c | ||
+++ b/avutil/avutil_stubs.c | ||
@@ -17,6 +17,7 @@ | ||
#include <libavutil/avstring.h> | ||
#include <libavutil/pixdesc.h> | ||
#include <libavutil/pixfmt.h> | ||
+#include <libavutil/mem.h> | ||
|
||
#include "avutil_stubs.h" | ||
#include "channel_layout_stubs.h" | ||
@@ -512,7 +513,7 @@ enum caml_ba_kind bigarray_kind_of_AVSampleFormat(enum AVSampleFormat sf) { | ||
CAMLprim value ocaml_avutil_find_sample_fmt(value _name) { | ||
CAMLparam1(_name); | ||
CAMLlocal1(ans); | ||
- char *name = strndup(String_val(_name), caml_string_length(_name)); | ||
+ char *name = av_strndup(String_val(_name), caml_string_length(_name)); | ||
if (!name) | ||
caml_raise_out_of_memory(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters