projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4f607e
)
audiobasesrc: Round down segsize to an integer number of samples
author
wangzq
<qiang_jsj@live.cn>
Thu, 28 Jun 2018 12:13:04 +0000
(20:13 +0800)
committer
Sebastian Dröge
<sebastian@centricular.com>
Fri, 29 Jun 2018 05:38:20 +0000
(07:38 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=796704
gst-libs/gst/audio/gstaudiobasesrc.c
patch
|
blob
|
history
diff --git
a/gst-libs/gst/audio/gstaudiobasesrc.c
b/gst-libs/gst/audio/gstaudiobasesrc.c
index 8847d75b12cfe57e1a9bb0cbbec02561b416042c..9aaf75fdf5ed63cb20cad58679147f03730e2ce6 100644
(file)
--- a/
gst-libs/gst/audio/gstaudiobasesrc.c
+++ b/
gst-libs/gst/audio/gstaudiobasesrc.c
@@
-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);