summaryrefslogtreecommitdiffstats
path: root/sys/oss
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-10-24 14:04:38 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-10-24 14:04:38 +0000
commit25a10db2e2f9894c9b566a57c41a0fef32c7348e (patch)
tree468136a4e312774d4623fd082db65ad8e743a85f /sys/oss
parent4d4159166f769b908eb8e508f17a2bbf3299b0db (diff)
sys/oss/gstosssrc.c: Don't mix bytes and samples.
Original commit message from CVS: * sys/oss/gstosssrc.c: (gst_osssrc_get): Don't mix bytes and samples.
Diffstat (limited to 'sys/oss')
-rw-r--r--sys/oss/gstosssrc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c
index 1bd2521d..da7e61d7 100644
--- a/sys/oss/gstosssrc.c
+++ b/sys/oss/gstosssrc.c
@@ -382,7 +382,7 @@ gst_osssrc_get (GstPad * pad)
GST_BUFFER_SIZE (buf) = readbytes;
GST_BUFFER_OFFSET (buf) = src->curoffset;
- GST_BUFFER_OFFSET_END (buf) = src->curoffset + readsamples;
+ GST_BUFFER_OFFSET_END (buf) = src->curoffset + readbytes;
GST_BUFFER_DURATION (buf) =
readsamples * GST_SECOND / GST_OSSELEMENT (src)->rate;
@@ -391,7 +391,7 @@ gst_osssrc_get (GstPad * pad)
if (src->clock == src->provided_clock) {
/* if it's our own clock, we can be very accurate */
GST_BUFFER_TIMESTAMP (buf) =
- src->curoffset * GST_SECOND / GST_OSSELEMENT (src)->rate;
+ src->curoffset * GST_SECOND / GST_OSSELEMENT (src)->bps;
} else {
/* somebody elses clock, timestamp with that clock, no discontinuity in
* the stream since the OFFSET is updated correctly. Elements can stretch
@@ -404,7 +404,7 @@ gst_osssrc_get (GstPad * pad)
GST_BUFFER_TIMESTAMP (buf) = GST_CLOCK_TIME_NONE;
}
- src->curoffset += readsamples;
+ src->curoffset += readbytes;
GST_DEBUG ("pushed buffer from soundcard of %ld bytes, timestamp %"
G_GINT64_FORMAT, readbytes, GST_BUFFER_TIMESTAMP (buf));