riff-media: Error out early if we observe an invalid audio format
This commit is contained in:
parent
5ecbc9eea2
commit
c1776a9dd3
@ -1233,6 +1233,10 @@ gst_riff_create_audio_caps (guint16 codec_id,
|
|||||||
|
|
||||||
format =
|
format =
|
||||||
gst_audio_format_build_integer (wd != 8, G_LITTLE_ENDIAN, wd, ws);
|
gst_audio_format_build_integer (wd != 8, G_LITTLE_ENDIAN, wd, ws);
|
||||||
|
if (format == GST_AUDIO_FORMAT_UNKNOWN) {
|
||||||
|
GST_WARNING ("Unsupported raw audio format with width %d", wd);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
caps = gst_caps_new_simple ("audio/x-raw",
|
caps = gst_caps_new_simple ("audio/x-raw",
|
||||||
"format", G_TYPE_STRING, gst_audio_format_to_string (format),
|
"format", G_TYPE_STRING, gst_audio_format_to_string (format),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user