mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
plugin: clarify code that deduces plugin name from file name
Make the final else branch explicit for clarity. https://bugzilla.gnome.org/show_bug.cgi?id=783333
This commit is contained in:
parent
c6bd520b8b
commit
f29082bfe1
1 changed files with 7 additions and 5 deletions
|
@ -686,7 +686,7 @@ extract_symname (const char *filename)
|
|||
{
|
||||
gchar *bname, *name, *symname;
|
||||
const gchar *dot;
|
||||
gsize prefix_len = 0, len;
|
||||
gsize prefix_len, len;
|
||||
int i;
|
||||
|
||||
bname = g_path_get_basename (filename);
|
||||
|
@ -696,11 +696,13 @@ extract_symname (const char *filename)
|
|||
}
|
||||
|
||||
if (g_str_has_prefix (bname, "libgst"))
|
||||
prefix_len += 6;
|
||||
prefix_len = 6;
|
||||
else if (g_str_has_prefix (bname, "lib"))
|
||||
prefix_len += 3;
|
||||
else if (g_str_has_prefix(bname, "gst"))
|
||||
prefix_len += 3;
|
||||
prefix_len = 3;
|
||||
else if (g_str_has_prefix (bname, "gst"))
|
||||
prefix_len = 3;
|
||||
else
|
||||
prefix_len = 0; /* use whole name (minus suffix) as plugin name */
|
||||
|
||||
dot = g_utf8_strchr (bname, -1, '.');
|
||||
if (dot)
|
||||
|
|
Loading…
Reference in a new issue