summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sys/oss/gstosssrc.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cd3e4707..b02fcfc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2004-10-24 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * sys/oss/gstosssrc.c: (gst_osssrc_get):
+ Don't mix bytes and samples.
+
+2004-10-24 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
* ext/ogg/gstoggmux.c:
Basic pad template which accepts OGM tracks, speex, flac, vorbis
and theora. Any is incorrect.
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));