[gst-cvs] gst-plugins-base: examples: fix g_object_set() value type.
Wim Taymans
wtay at kemper.freedesktop.org
Mon Mar 16 07:32:56 PDT 2009
Module: gst-plugins-base
Branch: master
Commit: ce9360b9fd0be4ed2a0d096ec5dd53c51db3d4ea
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=ce9360b9fd0be4ed2a0d096ec5dd53c51db3d4ea
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Mon Mar 16 15:31:44 2009 +0100
examples: fix g_object_set() value type.
Make sure we cast the length value as a gint64 to the vararg g_object_set() just
incase sizeof(gsize) != sizeof(gint64).
---
tests/examples/app/appsrc-ra.c | 2 +-
tests/examples/app/appsrc-seekable.c | 2 +-
tests/examples/app/appsrc-stream.c | 2 +-
tests/examples/app/appsrc-stream2.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/examples/app/appsrc-ra.c b/tests/examples/app/appsrc-ra.c
index aa4962f..2f1232b 100644
--- a/tests/examples/app/appsrc-ra.c
+++ b/tests/examples/app/appsrc-ra.c
@@ -125,7 +125,7 @@ found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
/* we can set the length in appsrc. This allows some elements to estimate the
* total duration of the stream. It's a good idea to set the property when you
* can but it's not required. */
- g_object_set (app->appsrc, "size", app->length, NULL);
+ g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
g_object_set (app->appsrc, "stream-type", 2, NULL);
/* configure the appsrc, we will push a buffer to appsrc when it needs more
diff --git a/tests/examples/app/appsrc-seekable.c b/tests/examples/app/appsrc-seekable.c
index 7137d13..27de6db 100644
--- a/tests/examples/app/appsrc-seekable.c
+++ b/tests/examples/app/appsrc-seekable.c
@@ -128,7 +128,7 @@ found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
/* we can set the length in appsrc. This allows some elements to estimate the
* total duration of the stream. It's a good idea to set the property when you
* can but it's not required. */
- g_object_set (app->appsrc, "size", app->length, NULL);
+ g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
/* we are seekable in push mode, this means that the element usually pushes
* out buffers of an undefined size and that seeks happen only occasionally
* and only by request of the user. */
diff --git a/tests/examples/app/appsrc-stream.c b/tests/examples/app/appsrc-stream.c
index 870d707..7038cd3 100644
--- a/tests/examples/app/appsrc-stream.c
+++ b/tests/examples/app/appsrc-stream.c
@@ -151,7 +151,7 @@ found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
/* we can set the length in appsrc. This allows some elements to estimate the
* total duration of the stream. It's a good idea to set the property when you
* can but it's not required. */
- g_object_set (app->appsrc, "size", app->length, NULL);
+ g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
/* configure the appsrc, we will push data into the appsrc from the
* mainloop. */
diff --git a/tests/examples/app/appsrc-stream2.c b/tests/examples/app/appsrc-stream2.c
index 866b050..dc1d8ca 100644
--- a/tests/examples/app/appsrc-stream2.c
+++ b/tests/examples/app/appsrc-stream2.c
@@ -123,7 +123,7 @@ found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app)
/* we can set the length in appsrc. This allows some elements to estimate the
* total duration of the stream. It's a good idea to set the property when you
* can but it's not required. */
- g_object_set (app->appsrc, "size", app->length, NULL);
+ g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
/* configure the appsrc, we will push a buffer to appsrc when it needs more
* data */
More information about the Gstreamer-commits
mailing list