gst/videorate/gstvideorate.c: Fixed videorate, fixating an already fixated caps is not an error.

Original commit message from CVS:
* gst/videorate/gstvideorate.c: (gst_videorate_transformcaps),
(gst_videorate_getcaps), (gst_videorate_setcaps),
(gst_videorate_event), (gst_videorate_chain):
Fixed videorate, fixating an already fixated caps is not
an error.
This commit is contained in:
Wim Taymans 2005-06-23 16:23:12 +00:00
parent 5a928a258f
commit 290cafefeb
2 changed files with 23 additions and 10 deletions

View file

@ -1,3 +1,11 @@
2005-06-23 Wim Taymans <wim@fluendo.com>
* gst/videorate/gstvideorate.c: (gst_videorate_transformcaps),
(gst_videorate_getcaps), (gst_videorate_setcaps),
(gst_videorate_event), (gst_videorate_chain):
Fixed videorate, fixating an already fixated caps is not
an error.
2005-06-23 Wim Taymans <wim@fluendo.com>
* ext/ogg/README:

View file

@ -294,28 +294,33 @@ gst_videorate_setcaps (GstPad * pad, GstCaps * caps)
/* see what the peer can do */
peercaps = gst_pad_get_caps (opeer);
GST_DEBUG ("icaps %" GST_PTR_FORMAT, peercaps);
GST_DEBUG ("transform %" GST_PTR_FORMAT, transform);
/* filter against our possibilities */
intersect = gst_caps_intersect (peercaps, transform);
gst_caps_unref (peercaps);
gst_caps_unref (transform);
GST_DEBUG ("intersect %" GST_PTR_FORMAT, intersect);
/* take first possibility */
caps = gst_caps_copy_nth (intersect, 0);
gst_caps_unref (intersect);
structure = gst_caps_get_structure (caps, 0);
/* and fixate */
if (gst_caps_structure_fixate_field_nearest_int (structure, "framerate",
fps)) {
gst_structure_get_double (structure, "framerate", &fps);
if (otherpad == videorate->srcpad) {
videorate->to_fps = fps;
} else {
videorate->from_fps = fps;
}
gst_pad_set_caps (otherpad, caps);
ret = TRUE;
gst_caps_structure_fixate_field_nearest_int (structure, "framerate", fps);
gst_structure_get_double (structure, "framerate", &fps);
if (otherpad == videorate->srcpad) {
videorate->to_fps = fps;
} else {
videorate->from_fps = fps;
}
gst_pad_set_caps (otherpad, caps);
ret = TRUE;
}
gst_object_unref (GST_OBJECT (opeer));
}