projects
/
platform
/
upstream
/
gst-plugins-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46833b9
)
alsa: cleanup name lookup.
author
Stefan Kost
<ensonic@users.sf.net>
Thu, 26 Feb 2009 14:47:39 +0000
(16:47 +0200)
committer
Stefan Kost
<ensonic@users.sf.net>
Thu, 26 Feb 2009 16:01:05 +0000
(18:01 +0200)
We can break, once we have a name to make sure, we won't read it ever twice.
ext/alsa/gstalsa.c
patch
|
blob
|
history
diff --git
a/ext/alsa/gstalsa.c
b/ext/alsa/gstalsa.c
index
9fb16a4
..
17afe1f
100644
(file)
--- a/
ext/alsa/gstalsa.c
+++ b/
ext/alsa/gstalsa.c
@@
-493,9
+493,13
@@
gst_alsa_find_device_name_no_handle (GstObject * obj, const gchar * devcard,
break;
}
- ret =
g_strdup (snd_pcm_info_get_name (pcminfo)
);
+ ret =
(gchar *) snd_pcm_info_get_name (pcminfo
);
snd_pcm_info_free (pcminfo);
- GST_LOG_OBJECT (obj, "name from pcminfo: %s", GST_STR_NULL (ret));
+ if (ret) {
+ ret = g_strdup (ret);
+ GST_LOG_OBJECT (obj, "name from pcminfo: %s", ret);
+ break;
+ }
}
}