encoding-profile: Add guard against profiles without format

This commit is contained in:
Edward Hervey 2010-12-21 13:08:15 +01:00
parent d20b84f1d2
commit c6bc271e7e

View file

@ -673,6 +673,8 @@ GstEncodingContainerProfile *
gst_encoding_container_profile_new (const gchar * name, gst_encoding_container_profile_new (const gchar * name,
const gchar * description, GstCaps * format, const gchar * preset) const gchar * description, GstCaps * format, const gchar * preset)
{ {
g_return_val_if_fail (GST_IS_CAPS (format), NULL);
return (GstEncodingContainerProfile *) return (GstEncodingContainerProfile *)
common_creation (GST_TYPE_ENCODING_CONTAINER_PROFILE, format, preset, common_creation (GST_TYPE_ENCODING_CONTAINER_PROFILE, format, preset,
name, description, NULL, 0); name, description, NULL, 0);