Commit 99e0274f authored by Wim Taymans's avatar Wim Taymans

ext/raw1394/gstdv1394src.c: Use scale functions

Original commit message from CVS:
* ext/raw1394/gstdv1394src.c: (gst_dv1394src_convert):
Use scale functions
parent 55747906
2006-04-21 Wim Taymans <wim@fluendo.com>
* ext/raw1394/gstdv1394src.c: (gst_dv1394src_convert):
Use scale functions
2006-04-21 Tim-Philipp Müller <tim at centricular dot net>
* ext/dv/gstdv.c: (plugin_init):
......
......@@ -803,7 +803,9 @@ gst_dv1394src_convert (GstPad * pad,
case GST_FORMAT_BYTES:
src_value *= src->frame_size;
case GST_FORMAT_DEFAULT:
*dest_value = src_value * src->frame_rate / GST_SECOND;
*dest_value =
gst_util_uint64_scale_int (src_value, src->frame_rate,
GST_SECOND);
break;
default:
goto not_supported;
......@@ -818,7 +820,9 @@ gst_dv1394src_convert (GstPad * pad,
break;
case GST_FORMAT_TIME:
if (src->frame_rate != 0)
*dest_value = src_value * GST_SECOND / src->frame_rate;
*dest_value =
gst_util_uint64_scale_int (src_value, GST_SECOND,
src->frame_rate);
else
goto not_supported;
break;
......@@ -835,6 +839,7 @@ gst_dv1394src_convert (GstPad * pad,
not_supported:
{
GST_DEBUG_OBJECT (src, "unsupported conversion");
gst_object_unref (src);
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment