decoder: drop useless checks for codec objects.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 2 Jan 2013 15:06:18 +0000 (16:06 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 3 Jan 2013 08:08:19 +0000 (09:08 +0100)
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
gst-libs/gst/vaapi/gstvaapidecoder_objects.c

index 450e50e..eddd7bd 100644 (file)
@@ -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),
index 541a097..eb6a83f 100644 (file)
@@ -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),