~vcs-imports/gstreamer/old-trunk

« back to all changes in this revision

Viewing changes to plugins/elements/gstfilesrc.c

  • Committer: slomo
  • Date: 2007-02-13 13:40:04 UTC
  • Revision ID: vcs-imports@canonical.com-20070213134004-d1362152bc283edc
* plugins/elements/gstfilesink.c: (gst_file_sink_uri_set_uri):
* plugins/elements/gstfilesrc.c: (gst_file_src_uri_set_uri):
Also check for an absolute path following file:// in the filesrc
element. Remove redundant check and call g_path_is_absolute() on the
unescaped location.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1074
1074
     * "location" with uri + 16 because it provides unescaping */
1075
1075
    location = gst_uri_get_location (tmp);
1076
1076
    g_free (tmp);
1077
 
  } else if (!g_str_has_prefix (uri, "file://")) {
1078
 
    return FALSE;
1079
 
  } else if (!g_path_is_absolute (uri + strlen ("file://"))) {
1080
 
    return FALSE;
1081
1077
  } else {
1082
1078
    location = gst_uri_get_location (uri);
 
1079
    if (!location)
 
1080
      return FALSE;
 
1081
    if (!g_path_is_absolute (location)) {
 
1082
      g_free (location);
 
1083
      return FALSE;
 
1084
    }
1083
1085
  }
1084
1086
 
1085
1087
  ret = gst_file_src_set_location (src, location);