mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
pbutils: Avoid assertion describing raw audio caps without format
We used to get: gst_audio_format_from_string: assertion 'format != NULL' failed
This commit is contained in:
parent
77b23ea0ac
commit
8600fc3148
1 changed files with 3 additions and 2 deletions
|
@ -823,11 +823,12 @@ format_info_get_desc (const FormatInfo * info, const GstCaps * caps)
|
||||||
gint depth = 0;
|
gint depth = 0;
|
||||||
gboolean is_float;
|
gboolean is_float;
|
||||||
const gchar *str;
|
const gchar *str;
|
||||||
GstAudioFormat format;
|
GstAudioFormat format = GST_AUDIO_FORMAT_UNKNOWN;
|
||||||
const GstAudioFormatInfo *finfo;
|
const GstAudioFormatInfo *finfo;
|
||||||
|
|
||||||
str = gst_structure_get_string (s, "format");
|
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)
|
if (format == GST_AUDIO_FORMAT_UNKNOWN)
|
||||||
return g_strdup (_("Uncompressed audio"));
|
return g_strdup (_("Uncompressed audio"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue