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:
Philip Withnall 2014-05-28 10:23:24 +01:00 committed by Sebastian Dröge
parent 5d35675a74
commit ba87655628

View file

@ -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]);