deinterlace: small cleanups

This commit is contained in:
Wim Taymans 2012-09-06 13:23:30 +02:00
parent f1ef3b4983
commit a557282aaa

View file

@ -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