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

@ -726,7 +726,7 @@ gst_base_audio_src_get_offset (GstBaseAudioSrc * src)
if (diff >= segtotal) { if (diff >= segtotal) {
GST_DEBUG_OBJECT (src, "dropped, align to segment %d", segdone); GST_DEBUG_OBJECT (src, "dropped, align to segment %d", segdone);
/* sample would be dropped, position to next playable position */ /* sample would be dropped, position to next playable position */
sample = ((guint64) (segdone - segtotal + 1)) * sps; sample = ((guint64) (segdone)) * sps;
} }
return sample; return sample;