Fix gst_vaapi_image_new_with_image().
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 8 Sep 2011 12:40:08 +0000 (14:40 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 8 Sep 2011 12:51:30 +0000 (14:51 +0200)
gst-libs/gst/vaapi/gstvaapiimage.c

index f0186c3..c909603 100644 (file)
@@ -279,13 +279,16 @@ gst_vaapi_image_set_property(
         break;
     }
     case PROP_FORMAT:
-        priv->format = g_value_get_uint(value);
+        if (priv->create_image)
+            priv->format = g_value_get_uint(value);
         break;
     case PROP_WIDTH:
-        priv->width = g_value_get_uint(value);
+        if (priv->create_image)
+            priv->width = g_value_get_uint(value);
         break;
     case PROP_HEIGHT:
-        priv->height = g_value_get_uint(value);
+        if (priv->create_image)
+            priv->height = g_value_get_uint(value);
         break;
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);