summaryrefslogtreecommitdiffstats
path: root/gst-libs
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 /gst-libs
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)
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/play/play.c5
1 files changed, 3 insertions, 2 deletions
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);