mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
fdsrc: use g_ascii_strtoull() to convert size string in uri
sscanf() doesn't handle G_GUINT64_FORMAT well on mingw64 it appears, leading to compiler warnings. https://bugzilla.gnome.org/show_bug.cgi?id=744034
This commit is contained in:
parent
ae0b12b109
commit
d7dd082574
1 changed files with 4 additions and 2 deletions
|
@ -645,12 +645,14 @@ gst_fd_src_uri_set_uri (GstURIHandler * handler, const gchar * uri,
|
|||
}
|
||||
|
||||
if ((q = g_strstr_len (uri, -1, "?"))) {
|
||||
gchar *sp;
|
||||
gchar *sp, *end = NULL;
|
||||
|
||||
GST_INFO_OBJECT (src, "found ?");
|
||||
|
||||
if ((sp = g_strstr_len (q, -1, "size="))) {
|
||||
if (sscanf (sp, "size=%" G_GUINT64_FORMAT, &size) != 1) {
|
||||
sp += strlen ("size=");
|
||||
size = g_ascii_strtoull (sp, &end, 10);
|
||||
if ((size == 0 && errno == EINVAL) || size == G_MAXUINT64 || end == sp) {
|
||||
GST_INFO_OBJECT (src, "parsing size failed");
|
||||
size = -1;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue