From: <sl...@ke...> - 2010-10-06 13:14:22
|
Module: gst-plugins-good Branch: master Commit: 6a6f90e745b2d3e629bafa7b5d255e5d006e7ff3 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=6a6f90e745b2d3e629bafa7b5d255e5d006e7ff3 Author: Robert Swain <rob...@co...> Date: Wed Oct 6 11:29:55 2010 +0200 deinterlace: Fix required fields logic Both history_count and fields_required count from 1. As per the while loop condition that follows this code, to perform the deinterlacing method, we need history_count >= fields_required fields in the history. Therefore if we have history_count < fields_required (not fields_required + 1), we need more fields. --- gst/deinterlace/gstdeinterlace.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index a305b74..3c54e24 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -980,9 +980,9 @@ gst_deinterlace_chain (GstPad * pad, GstBuffer * buf) fields_required = gst_deinterlace_method_get_fields_required (self->method); /* Not enough fields in the history */ - if (self->history_count < fields_required + 1) { + if (self->history_count < fields_required) { GST_DEBUG_OBJECT (self, "Need more fields (have %d, need %d)", - self->history_count, fields_required + 1); + self->history_count, fields_required); return GST_FLOW_OK; } |