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

audio: Add a missing precondition to gst_audio_format_from_string()
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]);
Supports Markdown
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