From c727e5b6d6944851d1dd19b3b45eabefb039d899 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Wed, 2 Jan 2013 16:06:18 +0100 Subject: [PATCH] decoder: drop useless checks for codec objects. Codec objects are used internally only and they are bound to be created with a valid GstVaapiDecoder object. --- gst-libs/gst/vaapi/gstvaapicodec_objects.c | 8 -------- gst-libs/gst/vaapi/gstvaapidecoder_objects.c | 4 ---- 2 files changed, 12 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapicodec_objects.c b/gst-libs/gst/vaapi/gstvaapicodec_objects.c index 450e50eb8f..eddd7bd6b4 100644 --- a/gst-libs/gst/vaapi/gstvaapicodec_objects.c +++ b/gst-libs/gst/vaapi/gstvaapicodec_objects.c @@ -75,8 +75,6 @@ gst_vaapi_codec_object_new(const GstVaapiCodecObjectClass *object_class, GstVaapiCodecObject *va_obj; GstVaapiCodecObjectConstructorArgs args; - g_return_val_if_fail(codec != NULL, NULL); - obj = gst_vaapi_mini_object_new0(&object_class->parent_class); if (!obj) return NULL; @@ -139,8 +137,6 @@ gst_vaapi_iq_matrix_new( { GstVaapiCodecObject *object; - g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder), NULL); - object = gst_vaapi_codec_object_new( &GstVaapiIqMatrixClass, GST_VAAPI_CODEC_BASE(decoder), @@ -188,8 +184,6 @@ gst_vaapi_bitplane_new(GstVaapiDecoder *decoder, guint8 *data, guint data_size) { GstVaapiCodecObject *object; - g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder), NULL); - object = gst_vaapi_codec_object_new( &GstVaapiBitPlaneClass, GST_VAAPI_CODEC_BASE(decoder), @@ -241,8 +235,6 @@ gst_vaapi_huffman_table_new( { GstVaapiCodecObject *object; - g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder), NULL); - object = gst_vaapi_codec_object_new( &GstVaapiHuffmanTableClass, GST_VAAPI_CODEC_BASE(decoder), diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c index 541a0975bc..eb6a83f01c 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c @@ -183,8 +183,6 @@ gst_vaapi_picture_new( { GstVaapiCodecObject *object; - g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder), NULL); - object = gst_vaapi_codec_object_new( &GstVaapiPictureClass, GST_VAAPI_CODEC_BASE(decoder), @@ -405,8 +403,6 @@ gst_vaapi_slice_new( { GstVaapiCodecObject *object; - g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder), NULL); - object = gst_vaapi_codec_object_new( &GstVaapiSliceClass, GST_VAAPI_CODEC_BASE(decoder),