From a557282aaa7b2e26bcd08ba81caebf137ec57145 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 6 Sep 2012 13:23:30 +0200 Subject: [PATCH] deinterlace: small cleanups --- gst/deinterlace/gstdeinterlace.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index e03464c..803556d 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -2287,7 +2287,6 @@ error: static gboolean gst_deinterlace_setcaps (GstDeinterlace * self, GstPad * pad, GstCaps * caps) { - gboolean res = TRUE; GstCaps *srccaps; GstVideoInterlaceMode interlacing_mode; gint fps_n, fps_d; @@ -2314,9 +2313,6 @@ gst_deinterlace_setcaps (GstDeinterlace * self, GstPad * pad, GstCaps * caps) fps_n = GST_VIDEO_INFO_FPS_N (&self->vinfo); fps_d = GST_VIDEO_INFO_FPS_D (&self->vinfo); - if (!res) - goto invalid_caps; - gst_deinterlace_update_passthrough (self); interlacing_mode = GST_VIDEO_INFO_INTERLACE_MODE (&self->vinfo); @@ -2379,20 +2375,19 @@ gst_deinterlace_setcaps (GstDeinterlace * self, GstPad * pad, GstCaps * caps) gst_caps_unref (srccaps); -done: - - return res; + return TRUE; invalid_caps: - res = FALSE; - GST_ERROR_OBJECT (pad, "Invalid caps: %" GST_PTR_FORMAT, caps); - goto done; - + { + GST_ERROR_OBJECT (pad, "Invalid caps: %" GST_PTR_FORMAT, caps); + return FALSE; + } caps_not_accepted: - res = FALSE; - GST_ERROR_OBJECT (pad, "Caps not accepted: %" GST_PTR_FORMAT, srccaps); - gst_caps_unref (srccaps); - goto done; + { + GST_ERROR_OBJECT (pad, "Caps not accepted: %" GST_PTR_FORMAT, srccaps); + gst_caps_unref (srccaps); + return FALSE; + } } static gboolean -- 2.7.4