summaryrefslogtreecommitdiffstats
path: root/sys/oss/gstosssink.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2002-05-04 18:52:32 +0000
committerWim Taymans <wim.taymans@gmail.com>2002-05-04 18:52:32 +0000
commit7f83fbc9fe5f95cc9d8cbb4287ca5e3c94282038 (patch)
tree005cf182985d8962a06b8f98ac3a1d4cac98f57e /sys/oss/gstosssink.c
parent223ce42ed6a3c551f68005eaafb287d118dd271a (diff)
Reset the handled number of samples when going to PAUSED
Original commit message from CVS: Reset the handled number of samples when going to PAUSED Some cleanups
Diffstat (limited to 'sys/oss/gstosssink.c')
-rw-r--r--sys/oss/gstosssink.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c
index e7660a10..3765ddd5 100644
--- a/sys/oss/gstosssink.c
+++ b/sys/oss/gstosssink.c
@@ -710,31 +710,14 @@ gst_osssink_change_state (GstElement *element)
case GST_STATE_READY_TO_PAUSED:
osssink->offset = 0LL;
osssink->have_offset = FALSE;
+ osssink->handled = 0LL;
break;
case GST_STATE_PAUSED_TO_PLAYING:
- /* gst_clock_adjust (osssink->clock, osssink->offset - gst_clock_get_time (osssink->clock)); */
break;
case GST_STATE_PLAYING_TO_PAUSED:
{
- if (GST_FLAG_IS_SET (element, GST_OSSSINK_OPEN)) {
- if (osssink->bps) {
- GstClockTime time;
- audio_buf_info ospace;
- gint queued;
-
- ioctl (osssink->fd, SNDCTL_DSP_GETOSPACE, &ospace);
- ioctl (osssink->fd, SNDCTL_DSP_RESET, 0);
-
- queued = (ospace.fragstotal * ospace.fragsize) - ospace.bytes;
- time = osssink->offset + (osssink->handled - queued) * 1000000LL / osssink->bps;
-
- //gst_clock_adjust (osssink->clock, time - gst_clock_get_time (osssink->clock));
- }
- else {
- ioctl (osssink->fd, SNDCTL_DSP_RESET, 0);
- }
- }
-
+ if (GST_FLAG_IS_SET (element, GST_OSSSINK_OPEN))
+ ioctl (osssink->fd, SNDCTL_DSP_RESET, 0);
break;
}
case GST_STATE_PAUSED_TO_READY: