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> 2006-04-21 Tim-Philipp Müller <tim at centricular dot net>
* ext/dv/gstdv.c: (plugin_init): * ext/dv/gstdv.c: (plugin_init):
......
...@@ -803,7 +803,9 @@ gst_dv1394src_convert (GstPad * pad, ...@@ -803,7 +803,9 @@ gst_dv1394src_convert (GstPad * pad,
case GST_FORMAT_BYTES: case GST_FORMAT_BYTES:
src_value *= src->frame_size; src_value *= src->frame_size;
case GST_FORMAT_DEFAULT: 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; break;
default: default:
goto not_supported; goto not_supported;
...@@ -818,7 +820,9 @@ gst_dv1394src_convert (GstPad * pad, ...@@ -818,7 +820,9 @@ gst_dv1394src_convert (GstPad * pad,
break; break;
case GST_FORMAT_TIME: case GST_FORMAT_TIME:
if (src->frame_rate != 0) 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 else
goto not_supported; goto not_supported;
break; break;
...@@ -835,6 +839,7 @@ gst_dv1394src_convert (GstPad * pad, ...@@ -835,6 +839,7 @@ gst_dv1394src_convert (GstPad * pad,
not_supported: not_supported:
{ {
GST_DEBUG_OBJECT (src, "unsupported conversion");
gst_object_unref (src); gst_object_unref (src);
return FALSE; 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