mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
ext/raw1394/gstdv1394src.c: Use scale functions
Original commit message from CVS: * ext/raw1394/gstdv1394src.c: (gst_dv1394src_convert): Use scale functions
This commit is contained in:
parent
5574790649
commit
99e0274f14
2 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue