mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-09 13:48:55 +00:00
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.
This commit is contained in:
parent
0bffae750b
commit
6a6f90e745
1 changed files with 2 additions and 2 deletions
|
@ -980,9 +980,9 @@ gst_deinterlace_chain (GstPad * pad, GstBuffer * buf)
|
||||||
fields_required = gst_deinterlace_method_get_fields_required (self->method);
|
fields_required = gst_deinterlace_method_get_fields_required (self->method);
|
||||||
|
|
||||||
/* Not enough fields in the history */
|
/* 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)",
|
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;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue