diff --git a/gst-libs/gst/pbutils/descriptions.c b/gst-libs/gst/pbutils/descriptions.c index 97894c7aa2..8b633352a3 100644 --- a/gst-libs/gst/pbutils/descriptions.c +++ b/gst-libs/gst/pbutils/descriptions.c @@ -821,11 +821,12 @@ format_info_get_desc (const FormatInfo * info, const GstCaps * caps) gint depth = 0; gboolean is_float; const gchar *str; - GstAudioFormat format; + GstAudioFormat format = GST_AUDIO_FORMAT_UNKNOWN; const GstAudioFormatInfo *finfo; str = gst_structure_get_string (s, "format"); - format = gst_audio_format_from_string (str); + if (str) + format = gst_audio_format_from_string (str); if (format == GST_AUDIO_FORMAT_UNKNOWN) return g_strdup (_("Uncompressed audio"));