ducatimpeg4enc: avoid casting before checking if the cast is valid
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Wed, 22 Aug 2012 14:24:06 +0000 (14:24 +0000)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 7 Sep 2012 13:57:47 +0000 (13:57 +0000)
Especially as the cast was made after again.

src/gstducatimpeg4enc.c

index cd43018ceabe8c8e198f1edb5e46f4f1c2d53c5f..d93ec0ebba745a2021efa63041c21acc2b6ae545 100644 (file)
@@ -199,7 +199,7 @@ static void
 gst_ducati_mpeg4enc_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec)
 {
-  GstDucatiMPEG4Enc *self = GST_DUCATIMPEG4ENC (object);
+  GstDucatiMPEG4Enc *self;
 
   g_return_if_fail (GST_IS_DUCATIMPEG4ENC (object));
   self = GST_DUCATIMPEG4ENC (object);
@@ -220,7 +220,7 @@ static void
 gst_ducati_mpeg4enc_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec)
 {
-  GstDucatiMPEG4Enc *self = GST_DUCATIMPEG4ENC (object);
+  GstDucatiMPEG4Enc *self;
 
   g_return_if_fail (GST_IS_DUCATIMPEG4ENC (object));
   self = GST_DUCATIMPEG4ENC (object);