From ffd90dda89f92b0138d26f1f203360f60846d09c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 17 Jun 2009 14:00:23 +0200 Subject: [PATCH] audiosrc: fix get_offset When we need to jump to the most recently captured sample, jump to where the next sample will be written instead of to some old data. Fixes #581460 --- gst-libs/gst/audio/gstbaseaudiosrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstbaseaudiosrc.c b/gst-libs/gst/audio/gstbaseaudiosrc.c index e64d0ef..078eadc 100644 --- a/gst-libs/gst/audio/gstbaseaudiosrc.c +++ b/gst-libs/gst/audio/gstbaseaudiosrc.c @@ -726,7 +726,7 @@ gst_base_audio_src_get_offset (GstBaseAudioSrc * src) if (diff >= segtotal) { GST_DEBUG_OBJECT (src, "dropped, align to segment %d", segdone); /* sample would be dropped, position to next playable position */ - sample = ((guint64) (segdone - segtotal + 1)) * sps; + sample = ((guint64) (segdone)) * sps; } return sample; -- 2.7.4