mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 23:18:52 +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>
|
2005-06-23 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* ext/ogg/README:
|
* ext/ogg/README:
|
||||||
|
|
|
@ -294,20 +294,26 @@ gst_videorate_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
/* see what the peer can do */
|
/* see what the peer can do */
|
||||||
peercaps = gst_pad_get_caps (opeer);
|
peercaps = gst_pad_get_caps (opeer);
|
||||||
|
|
||||||
|
GST_DEBUG ("icaps %" GST_PTR_FORMAT, peercaps);
|
||||||
|
GST_DEBUG ("transform %" GST_PTR_FORMAT, transform);
|
||||||
|
|
||||||
/* filter against our possibilities */
|
/* filter against our possibilities */
|
||||||
intersect = gst_caps_intersect (peercaps, transform);
|
intersect = gst_caps_intersect (peercaps, transform);
|
||||||
gst_caps_unref (peercaps);
|
gst_caps_unref (peercaps);
|
||||||
gst_caps_unref (transform);
|
gst_caps_unref (transform);
|
||||||
|
|
||||||
|
GST_DEBUG ("intersect %" GST_PTR_FORMAT, intersect);
|
||||||
|
|
||||||
/* take first possibility */
|
/* take first possibility */
|
||||||
caps = gst_caps_copy_nth (intersect, 0);
|
caps = gst_caps_copy_nth (intersect, 0);
|
||||||
gst_caps_unref (intersect);
|
gst_caps_unref (intersect);
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
/* and fixate */
|
/* and fixate */
|
||||||
if (gst_caps_structure_fixate_field_nearest_int (structure, "framerate",
|
gst_caps_structure_fixate_field_nearest_int (structure, "framerate", fps);
|
||||||
fps)) {
|
|
||||||
gst_structure_get_double (structure, "framerate", &fps);
|
gst_structure_get_double (structure, "framerate", &fps);
|
||||||
|
|
||||||
if (otherpad == videorate->srcpad) {
|
if (otherpad == videorate->srcpad) {
|
||||||
videorate->to_fps = fps;
|
videorate->to_fps = fps;
|
||||||
} else {
|
} else {
|
||||||
|
@ -316,7 +322,6 @@ gst_videorate_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
gst_pad_set_caps (otherpad, caps);
|
gst_pad_set_caps (otherpad, caps);
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
gst_object_unref (GST_OBJECT (opeer));
|
gst_object_unref (GST_OBJECT (opeer));
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Reference in a new issue