diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-04-08 18:04:22 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-04-08 18:06:54 +0200 |
commit | cae2981f83aff340ff1af79d23a0c78c84fd2287 (patch) | |
tree | 6535a4726437a50f2fa992de5cacf104e0ba0feb | |
parent | 509256dce531fe4395f9bddf60d9c5c5dffb07cc (diff) |
baseaudiosink: fix a small glitch after pause
After we pause the stream and interrupt the writeout to the ringbuffer, also adjust
the amount of output samples we consumed. We can't do this reliably with the
current API when we are doing trick modes but we can do the right thing for
normal playback.
-rw-r--r-- | gst-libs/gst/audio/gstbaseaudiosink.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c index 59318ab54..5e7c14eb3 100644 --- a/gst-libs/gst/audio/gstbaseaudiosink.c +++ b/gst-libs/gst/audio/gstbaseaudiosink.c @@ -1495,6 +1495,13 @@ no_sync: * be aligned to this one */ align_next = FALSE; + /* update the output samples. FIXME, this will just skip them when pausing + * during trick mode */ + if (out_samples > written) + out_samples -= written; + else + break; + samples -= written; data += written * bps; } while (TRUE); |