diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2006-04-21 17:59:03 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2006-04-21 17:59:03 +0000 |
commit | 99e0274f1499569afdd957c218a444325f14cdef (patch) | |
tree | f36453159fd0b903d5941797250c0b820c8d1af9 /ext/raw1394 | |
parent | 55747906492fae008a7b605dcf880d011fdf2dbb (diff) |
ext/raw1394/gstdv1394src.c: Use scale functions
Original commit message from CVS:
* ext/raw1394/gstdv1394src.c: (gst_dv1394src_convert):
Use scale functions
Diffstat (limited to 'ext/raw1394')
-rw-r--r-- | ext/raw1394/gstdv1394src.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c index d3942d6ce..7a9cceaa5 100644 --- a/ext/raw1394/gstdv1394src.c +++ b/ext/raw1394/gstdv1394src.c @@ -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; } |