imagefreeze: Set undefined framerate in sink getcaps function

This commit is contained in:
Sebastian Dröge 2010-02-28 16:04:31 +01:00 committed by Tim-Philipp Müller
parent 53de7943c7
commit 3e574eafe3

View file

@ -251,6 +251,7 @@ gst_image_freeze_sink_getcaps (GstPad * pad)
{
GstImageFreeze *self = GST_IMAGE_FREEZE (gst_pad_get_parent (pad));
GstCaps *ret, *tmp;
guint i, n;
if (GST_PAD_CAPS (pad)) {
ret = gst_caps_copy (GST_PAD_CAPS (pad));
@ -265,6 +266,15 @@ gst_image_freeze_sink_getcaps (GstPad * pad)
ret = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
}
n = gst_caps_get_size (ret);
for (i = 0; i < n; i++) {
GstStructure *s = gst_caps_get_structure (ret, i);
gst_structure_remove_field (s, "framerate");
gst_structure_set (s, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT,
1, NULL);
}
done:
gst_object_unref (self);