mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
audio: Add a missing precondition to gst_audio_format_from_string()
https://bugzilla.gnome.org/show_bug.cgi?id=730874
This commit is contained in:
parent
5d35675a74
commit
ba87655628
1 changed files with 2 additions and 0 deletions
|
@ -404,6 +404,8 @@ gst_audio_format_from_string (const gchar * format)
|
|||
{
|
||||
guint i;
|
||||
|
||||
g_return_val_if_fail (format != NULL, GST_AUDIO_FORMAT_UNKNOWN);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (formats); i++) {
|
||||
if (strcmp (GST_AUDIO_FORMAT_INFO_NAME (&formats[i]), format) == 0)
|
||||
return GST_AUDIO_FORMAT_INFO_FORMAT (&formats[i]);
|
||||
|
|
Loading…
Reference in a new issue