gst: return NULL for unknown format

This commit is contained in:
Wim Taymans 2020-07-13 11:50:06 +02:00
parent 031a8ea799
commit a596cdbf2e

View file

@ -858,6 +858,8 @@ gst_caps_from_format (const struct spa_pod *format)
"stream-format", G_TYPE_STRING, "byte-stream", "stream-format", G_TYPE_STRING, "byte-stream",
"alignment", G_TYPE_STRING, "au", "alignment", G_TYPE_STRING, "au",
NULL); NULL);
} else {
return NULL;
} }
if ((prop = spa_pod_object_find_prop (obj, prop, SPA_FORMAT_VIDEO_size))) { if ((prop = spa_pod_object_find_prop (obj, prop, SPA_FORMAT_VIDEO_size))) {
handle_rect_prop (prop, "width", "height", res); handle_rect_prop (prop, "width", "height", res);