mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-27 08:26:39 +00:00
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:
parent
57a13f28de
commit
ffd90dda89
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue