deinterlace: fix infinite loop on EOS with non-default methods or fields

Fixes problem of infinite loop in gst_deinterlace_reset_history.
Last field in the history was never deinterlaced because idx becomes negative.

Happens e.g. with method=scalerbob fields=bottom or
method=greedyl fields=top

https://bugzilla.gnome.org/show_bug.cgi?id=695644
https://bugzilla.gnome.org/show_bug.cgi?id=693173
This commit is contained in:
Kishore Arepalli 2013-03-14 14:12:05 +01:00 committed by Tim-Philipp Müller
parent 3b943a56da
commit 288e05c99d

View file

@ -1708,6 +1708,8 @@ restart:
if (!flushing && self->cur_field_idx < 1) {
goto need_more;
} else if (self->cur_field_idx < 0 && flushing) {
self->cur_field_idx++;
}
if (self->fields == GST_DEINTERLACE_ALL || IS_TELECINE (interlacing_mode))