commit | d6271b4dab9b503c4b3273b97877512e81b93f89 | [log] [tgz] |
---|---|---|
author | wangzq <qiang_jsj@live.cn> | Thu Jun 28 20:13:04 2018 +0800 |
committer | Tim-Philipp Müller <tim@centricular.com> | Wed Jul 18 14:29:55 2018 +0100 |
tree | 686baa0bd6cc472566a665aeca55a66653a84c0c | |
parent | b0876438b70f20467af85f61680b33dbe45e4ba2 [diff] |
audiobasesrc: Round down segsize to an integer number of samples https://bugzilla.gnome.org/show_bug.cgi?id=796704
diff --git a/gst-libs/gst/audio/gstaudiobasesrc.c b/gst-libs/gst/audio/gstaudiobasesrc.c index e8063eb..7761e51 100644 --- a/gst-libs/gst/audio/gstaudiobasesrc.c +++ b/gst-libs/gst/audio/gstaudiobasesrc.c
@@ -540,6 +540,8 @@ /* 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);