diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gst-libs/gst/play/play.c | 5 |
2 files changed, 10 insertions, 2 deletions
@@ -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); |