From: Wim Taymans Date: Thu, 16 Apr 2009 20:50:59 +0000 (+0200) Subject: pulsesink: fix sample offset calculation again X-Git-Tag: RELEASE-0.10.15~294 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c052906590e8a2a76f6311e8c194bb6dbe350d7f;p=platform%2Fupstream%2Fgst-plugins-good.git pulsesink: fix sample offset calculation again --- diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index 8f8805f6e..23b69be6f 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -999,7 +999,8 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample, else offset = 0; } - offset = *sample * bps; + /* offset is in bytes */ + offset *= bps; while (*toprocess > 0) { size_t avail; @@ -1088,7 +1089,7 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample, avail = towrite / bps; } *sample += avail; - offset = *sample * bps; + offset += avail * bps; /* check if we need to uncork after writing the samples */ if (pbuf->corked) {