mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
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.
This commit is contained in:
parent
4d4159166f
commit
25a10db2e2
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
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:
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue