diff --git a/gst/gsturi.c b/gst/gsturi.c index 8c0e0c6a5d..8623d44659 100644 --- a/gst/gsturi.c +++ b/gst/gsturi.c @@ -1219,7 +1219,12 @@ _remove_dot_segments (GList * path) out = g_list_delete_link (out, prev); } g_free (elem->data); - out = g_list_delete_link (out, elem); + if (next != NULL) { + out = g_list_delete_link (out, elem); + } else { + /* path ends in '/..' We need to keep the last '/' */ + elem->data = NULL; + } } }