Original commit message from CVS:
UNITS
This commit is contained in:
Thomas Vander Stichele 2002-06-02 15:57:30 +00:00
parent a1bdcdc0c8
commit 227da54688

View file

@ -595,7 +595,7 @@ gst_osssink_convert (GstPad *pad, GstFormat src_format, gint64 src_value,
case GST_FORMAT_TIME: case GST_FORMAT_TIME:
*dest_value = src_value * GST_SECOND / osssink->bps; *dest_value = src_value * GST_SECOND / osssink->bps;
break; break;
case GST_FORMAT_UNIT: case GST_FORMAT_UNITS:
*dest_value = src_value / (osssink->channels * osssink->width); *dest_value = src_value / (osssink->channels * osssink->width);
break; break;
default: default:
@ -609,14 +609,14 @@ gst_osssink_convert (GstPad *pad, GstFormat src_format, gint64 src_value,
case GST_FORMAT_BYTES: case GST_FORMAT_BYTES:
*dest_value = src_value * osssink->bps / GST_SECOND; *dest_value = src_value * osssink->bps / GST_SECOND;
break; break;
case GST_FORMAT_UNIT: case GST_FORMAT_UNITS:
*dest_value = osssink->frequency; *dest_value = osssink->frequency;
break; break;
default: default:
res = FALSE; res = FALSE;
} }
break; break;
case GST_FORMAT_UNIT: case GST_FORMAT_UNITS:
switch (*dest_format) { switch (*dest_format) {
case GST_FORMAT_DEFAULT: case GST_FORMAT_DEFAULT:
*dest_format = GST_FORMAT_TIME; *dest_format = GST_FORMAT_TIME;