encoding-profile: Add guard against profiles without format
authorEdward Hervey <edward.hervey@collabora.co.uk>
Tue, 21 Dec 2010 12:08:15 +0000 (13:08 +0100)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Tue, 21 Dec 2010 12:08:15 +0000 (13:08 +0100)
gst-libs/gst/pbutils/encoding-profile.c

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