Commit ba876556 authored by Philip Withnall's avatar Philip Withnall Committed by Sebastian Dröge

audio: Add a missing precondition to gst_audio_format_from_string()

https://bugzilla.gnome.org/show_bug.cgi?id=730874
parent 5d35675a
......@@ -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]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment