mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
imagefreeze: Set undefined framerate in sink getcaps function
This commit is contained in:
parent
53de7943c7
commit
3e574eafe3
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue