Fix gst_vaapi_profile_get_caps() to include the "profile" field.
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Thu, 29 Apr 2010 21:12:30 +0000 (21:12 +0000)
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Mon, 20 Sep 2010 10:55:41 +0000 (12:55 +0200)
gst-libs/gst/vaapi/gstvaapiprofile.c

index c832a2b..11c67ad 100644 (file)
@@ -279,8 +279,17 @@ GstCaps *
 gst_vaapi_profile_get_caps(GstVaapiProfile profile)
 {
     const GstVaapiProfileMap * const m = get_profiles_map(profile);
+    GstCaps *caps;
 
-    return m ? gst_caps_from_string(m->caps_str) : NULL;
+    if (!m)
+        return NULL;
+
+    caps = gst_caps_from_string(m->caps_str);
+    if (!caps)
+        return NULL;
+
+    gst_caps_set_simple(caps, "profile", G_TYPE_STRING, m->profile_str, NULL);
+    return caps;
 }
 
 /**