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 static gboolean
gst_deinterlace_setcaps (GstDeinterlace * self, GstPad * pad, GstCaps * caps) gst_deinterlace_setcaps (GstDeinterlace * self, GstPad * pad, GstCaps * caps)
{ {
gboolean res = TRUE;
GstCaps *srccaps; GstCaps *srccaps;
GstVideoInterlaceMode interlacing_mode; GstVideoInterlaceMode interlacing_mode;
gint fps_n, fps_d; 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_n = GST_VIDEO_INFO_FPS_N (&self->vinfo);
fps_d = GST_VIDEO_INFO_FPS_D (&self->vinfo); fps_d = GST_VIDEO_INFO_FPS_D (&self->vinfo);
if (!res)
goto invalid_caps;
gst_deinterlace_update_passthrough (self); gst_deinterlace_update_passthrough (self);
interlacing_mode = GST_VIDEO_INFO_INTERLACE_MODE (&self->vinfo); 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); gst_caps_unref (srccaps);
done: return TRUE;
return res;
invalid_caps: invalid_caps:
res = FALSE; {
GST_ERROR_OBJECT (pad, "Invalid caps: %" GST_PTR_FORMAT, caps); GST_ERROR_OBJECT (pad, "Invalid caps: %" GST_PTR_FORMAT, caps);
goto done; return FALSE;
}
caps_not_accepted: caps_not_accepted:
res = FALSE; {
GST_ERROR_OBJECT (pad, "Caps not accepted: %" GST_PTR_FORMAT, srccaps); GST_ERROR_OBJECT (pad, "Caps not accepted: %" GST_PTR_FORMAT, srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
goto done; return FALSE;
}
} }
static gboolean static gboolean