mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
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:
parent
5a928a258f
commit
290cafefeb
2 changed files with 23 additions and 10 deletions
|
@ -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:
|
||||
|
|
|
@ -294,20 +294,26 @@ 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_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 {
|
||||
|
@ -316,7 +322,6 @@ gst_videorate_setcaps (GstPad * pad, GstCaps * caps)
|
|||
gst_pad_set_caps (otherpad, caps);
|
||||
ret = TRUE;
|
||||
}
|
||||
}
|
||||
gst_object_unref (GST_OBJECT (opeer));
|
||||
}
|
||||
done:
|
||||
|
|
Loading…
Reference in a new issue