summaryrefslogtreecommitdiffstats
path: root/gst/qtmux
diff options
context:
space:
mode:
Diffstat (limited to 'gst/qtmux')
-rw-r--r--gst/qtmux/Makefile.am1
-rw-r--r--gst/qtmux/gstqtmux.c24
2 files changed, 24 insertions, 1 deletions
diff --git a/gst/qtmux/Makefile.am b/gst/qtmux/Makefile.am
index e93ff67b..6bf65577 100644
--- a/gst/qtmux/Makefile.am
+++ b/gst/qtmux/Makefile.am
@@ -14,6 +14,7 @@ libgstqtmux_la_SOURCES = gstqtmux.c \
libgstqtmux_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
libgstqtmux_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
libgstqtmux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstqtmux_la_LIBTOOLFLAGS = --tag=disable-static
# headers we need but don't want installed
noinst_HEADERS = gstqtmux.h \
diff --git a/gst/qtmux/gstqtmux.c b/gst/qtmux/gstqtmux.c
index c3ac67fb..4b4344b0 100644
--- a/gst/qtmux/gstqtmux.c
+++ b/gst/qtmux/gstqtmux.c
@@ -75,6 +75,19 @@
#include <gst/gst.h>
#include <gst/base/gstcollectpads.h>
+#include <sys/types.h>
+#ifdef G_OS_WIN32
+#include <io.h> /* lseek, open, close, read */
+#undef lseek
+#define lseek _lseeki64
+#undef off_t
+#define off_t guint64
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
#include "gstqtmux.h"
GST_DEBUG_CATEGORY_STATIC (gst_qt_mux_debug);
@@ -603,8 +616,17 @@ gst_qt_mux_send_buffered_data (GstQTMux * qtmux, guint64 * offset)
if (fflush (qtmux->fast_start_file))
goto flush_failed;
- if (fseek (qtmux->fast_start_file, 0, SEEK_SET))
+#ifdef HAVE_FSEEKO
+ if (fseeko (qtmux->fast_start_file, (off_t) 0, SEEK_SET) != 0)
goto seek_failed;
+#elif defined (G_OS_UNIX) || defined (G_OS_WIN32)
+ if (lseek (fileno (qtmux->fast_start_file), (off_t) 0,
+ SEEK_SET) == (off_t) - 1)
+ goto seek_failed;
+#else
+ if (fseek (qtmux->fast_start_file, (long) 0, SEEK_SET) != 0)
+ goto seek_failed;
+#endif
/* hm, this could all take a really really long time,
* but there may not be another way to get moov atom first