gst/gstutils.c: Small cleanup.

Original commit message from CVS:
* gst/gstutils.c: (gst_util_uint64_scale_int64),
(gst_util_uint64_scale_int):
Small cleanup.

* libs/gst/base/gstbasesink.c: (gst_base_sink_handle_object):
Add debug log line.

* libs/gst/base/gstbasetransform.c: (gst_base_transform_event):
Add FIXME.
This commit is contained in:
Wim Taymans 2005-12-02 11:36:50 +00:00
parent 45fce73f08
commit db2b4d916c
4 changed files with 31 additions and 18 deletions

View file

@ -1,3 +1,15 @@
2005-12-02 Wim Taymans <wim@fluendo.com>
* gst/gstutils.c: (gst_util_uint64_scale_int64),
(gst_util_uint64_scale_int):
Small cleanup.
* libs/gst/base/gstbasesink.c: (gst_base_sink_handle_object):
Add debug log line.
* libs/gst/base/gstbasetransform.c: (gst_base_transform_event):
Add FIXME.
2005-12-02 Thomas Vander Stichele <thomas at apestaart dot org>
* win32/MANIFEST:

View file

@ -428,12 +428,11 @@ static guint64
gst_util_uint64_scale_int64 (guint64 val, guint64 num, guint64 denom)
{
GstUInt64 a0, a1, b0, b1, c0, ct, c1, result;
GstUInt64 v, n, d;
GstUInt64 v, n;
/* prepare input */
v.ll = val;
n.ll = num;
d.ll = denom;
/* do 128 bits multiply
* nh nl
@ -551,6 +550,7 @@ guint64
gst_util_uint64_scale_int (guint64 val, gint num, gint denom)
{
GstUInt64 result;
GstUInt64 low, high;
g_return_val_if_fail (denom > 0, G_MAXUINT64);
g_return_val_if_fail (num >= 0, G_MAXUINT64);
@ -561,11 +561,9 @@ gst_util_uint64_scale_int (guint64 val, gint num, gint denom)
if (num == 1 && denom == 1)
return val;
if (val <= G_MAXUINT32) {
if (val <= G_MAXUINT32)
/* simple case */
result.ll = val * num / denom;
} else {
GstUInt64 low, high;
return val * num / denom;
/* do 96 bits mult/div */
low.ll = val;
@ -581,7 +579,7 @@ gst_util_uint64_scale_int (guint64 val, gint num, gint denom)
goto overflow;
result.l.high += low.l.low;
}
return result.ll;
overflow:

View file

@ -722,6 +722,7 @@ dropping:
{
GstBuffer *buf;
GST_DEBUG_OBJECT (basesink, "dropping buffer");
buf = GST_BUFFER (g_queue_pop_tail (basesink->preroll_queue));
gst_buffer_unref (buf);

View file

@ -1060,6 +1060,8 @@ gst_base_transform_event (GstPad * pad, GstEvent * event)
if (bclass->event)
ret = bclass->event (trans, event);
/* FIXME, do this in the default event handler so the subclass can do
* something different. */
if (ret)
ret = gst_pad_event_default (pad, event);