mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
audiobasesrc: Round down segsize to an integer number of samples
https://bugzilla.gnome.org/show_bug.cgi?id=796704
This commit is contained in:
parent
d4f607ef40
commit
9f51607723
1 changed files with 2 additions and 0 deletions
|
@ -536,6 +536,8 @@ gst_audio_base_src_setcaps (GstBaseSrc * bsrc, GstCaps * caps)
|
|||
|
||||
/* calculate suggested segsize and segtotal */
|
||||
spec->segsize = rate * bpf * spec->latency_time / GST_MSECOND;
|
||||
/* Round to an integer number of samples */
|
||||
spec->segsize -= spec->segsize % bpf;
|
||||
spec->segtotal = spec->buffer_time / spec->latency_time;
|
||||
|
||||
GST_OBJECT_UNLOCK (src);
|
||||
|
|
Loading…
Reference in a new issue