summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-10-23 14:04:22 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-11-16 16:50:31 +0100
commit1f183e52172aa45110dceb2a93c201dbf76c8c97 (patch)
treeeda70064142eabed13f6012d0f71723e297b63ac /gst-libs/gst
parentc362c5e766c7616e1ca00e94ba9276aa3d0d06b0 (diff)
decoder: fix gst_vaapi_picture_new_field() object type.
Fix gst_vaapi_picture_new_field() to preserve the original picture type. e.g. gst_vaapi_picture_new_field() with a GstVaapiPictureH264 argument shall generate a GstVaapiPictureH264 object.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_objects.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c
index 5f90fb02..06cdc9a4 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c
@@ -215,13 +215,15 @@ gst_vaapi_picture_new(
GstVaapiPicture *
gst_vaapi_picture_new_field(GstVaapiPicture *picture)
{
+ GType type;
GstMiniObject *obj;
GstVaapiCodecObject *va_obj;
GstVaapiCodecObjectConstructorArgs args;
g_return_val_if_fail(GST_VAAPI_IS_PICTURE(picture), NULL);
- obj = gst_mini_object_new(GST_VAAPI_TYPE_PICTURE);
+ type = G_TYPE_FROM_CLASS(GST_VAAPI_PICTURE_GET_CLASS(picture));
+ obj = gst_mini_object_new(type);
if (!obj)
return NULL;