mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
multiudpsink: Reset windows error code after getting corresponding error message.
This commit is contained in:
parent
c3b0509beb
commit
2eb651d46f
1 changed files with 6 additions and 1 deletions
|
@ -411,7 +411,12 @@ socket_last_error_message ()
|
|||
if (FAILED (result)) {
|
||||
return g_strdup ("failed to get error message from system");
|
||||
} else {
|
||||
return g_convert ((gchar *) buf, -1, "UTF-16", "UTF-8", NULL, NULL, NULL);
|
||||
gchar *res =
|
||||
g_convert ((gchar *) buf, -1, "UTF-16", "UTF-8", NULL, NULL, NULL);
|
||||
/* g_convert() internally calls windows functions which reset the
|
||||
windows error code, so fix it up again like this */
|
||||
WSASetLastError (errorcode);
|
||||
return res;
|
||||
}
|
||||
#else
|
||||
return g_strdup (g_strerror (errno));
|
||||
|
|
Loading…
Reference in a new issue