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
This commit is contained in:
Wim Taymans 2009-06-17 14:00:23 +02:00
parent 57a13f28de
commit ffd90dda89

View file

@ -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;