deinterlace: Handle image caps without asserting
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Thu, 3 Feb 2011 19:10:49 +0000 (16:10 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Fri, 4 Feb 2011 12:38:35 +0000 (09:38 -0300)
commitcb527623a31bf9cc701630f90c8754f336dd874b
tree3483cb7785a2cf37e668c55d7a0c2e995ecbbe86
parent18213aa214139de64495962761a4c3e4fad562ed
deinterlace: Handle image caps without asserting

Images might have framerate=0/1 in the caps, which caused an
assertion on deinterlace. I don't know of interlaced image formats
but deinterlace might be hardcoded on some generic pipelines and
it shouldn't assert.

The fix was to set field_duration to 0 if the input has a framerate
with a 0 numerator.

This patch also adds checks for this situation on the unit tests.

https://bugzilla.gnome.org/show_bug.cgi?id=641400
gst/deinterlace/gstdeinterlace.c
tests/check/elements/deinterlace.c