diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-12-11 20:42:05 -0800 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-12-14 10:23:19 +0100 |
commit | 6a4d0f27a76c455e03e3e53254ec45951b3cb7a7 (patch) | |
tree | c6add17ad4a07e73a469e0b11c6d71f53396483c | |
parent | 3fd9d206faffead8fd3406ae8af11fb0e3d57ffe (diff) | |
download | gstreamer-6a4d0f27a76c455e03e3e53254ec45951b3cb7a7.tar.gz |
queue2: enable large file support on Android
https://bugzilla.gnome.org/show_bug.cgi?id=758980
-rw-r--r-- | plugins/elements/gstqueue2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index 972c4d794c..9dbf26c408 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -73,6 +73,14 @@ #include <unistd.h> #endif +#ifdef __BIONIC__ /* Android */ +#undef lseek +#define lseek lseek64 +#undef off_t +#define off_t guint64 +#include <fcntl.h> +#endif + static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -1500,7 +1508,13 @@ gst_queue2_open_temp_location_file (GstQueue2 * queue) /* make copy of the template, we don't want to change this */ name = g_strdup (queue->temp_template); + +#ifdef __BIONIC__ + fd = g_mkstemp_full (name, O_RDWR | O_LARGEFILE, S_IRUSR | S_IWUSR); +#else fd = g_mkstemp (name); +#endif + if (fd == -1) goto mkstemp_failed; |