summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2005-05-04 11:33:54 +0000
committerTim-Philipp Müller <tim@centricular.net>2005-05-04 11:33:54 +0000
commitb962caac1033cd8a6003aabc367f62f008f41285 (patch)
tree1ebd1649e62b7802b703885b1690bafe87e0a11d
parent219970d94e8f083b634577495282d29ab35e5e43 (diff)
downloadgst-plugins-bad-b962caac1033cd8a6003aabc367f62f008f41285.tar.gz
gst-plugins-bad-b962caac1033cd8a6003aabc367f62f008f41285.tar.bz2
gst-plugins-bad-b962caac1033cd8a6003aabc367f62f008f41285.zip
gst-libs/gst/play/play.c: Fix compilation with gcc4 and, while we're at it, use g_get_current_dir() instead of using ...
Original commit message from CVS: * gst-libs/gst/play/play.c: (gst_play_set_location): Fix compilation with gcc4 and, while we're at it, use g_get_current_dir() instead of using getcwd() with a ridiculously small buffer. (#302864)
-rw-r--r--ChangeLog7
-rw-r--r--gst-libs/gst/play/play.c5
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 69552313..931ab91d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-05-04 Tim-Philipp Müller <tim at centricular dot net>
+
+ * gst-libs/gst/play/play.c: (gst_play_set_location):
+ Fix compilation with gcc4 and, while we're at it, use
+ g_get_current_dir() instead of using getcwd() with a
+ ridiculously small buffer. (#302864)
+
2005-05-03 Gergely Nagy <algernon@bonehunter.rulez.org>
* ext/ogg/gstoggmux.c: Lower default max-page-delay and
diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c
index d41c69a8..7f1dc579 100644
--- a/gst-libs/gst/play/play.c
+++ b/gst-libs/gst/play/play.c
@@ -314,10 +314,11 @@ gst_play_set_location (GstPlay * play, const char *location)
else if (location[0] == '/')
uri = g_strdup_printf ("file://%s", location);
else {
- char cwd[256];
+ gchar *cwd;
- getcwd (cwd, 255);
+ cwd = g_get_current_dir ();
uri = g_strdup_printf ("file://%s/%s", cwd, location);
+ g_free (cwd);
}
g_object_set (play->priv->playbin, "uri", uri, NULL);
g_free (uri);