From b962caac1033cd8a6003aabc367f62f008f41285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 4 May 2005 11:33:54 +0000 Subject: 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) --- ChangeLog | 7 +++++++ gst-libs/gst/play/play.c | 5 +++-- 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 + + * 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 * 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); -- cgit v1.2.1