After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796704 - audiobasesrc: Segsize must be an integer multiple of the sample size
audiobasesrc: Segsize must be an integer multiple of the sample size
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.8.3
Other Linux
: Normal normal
: 1.14.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-06-28 12:16 UTC by Wang Zhengqiang
Modified: 2018-07-18 14:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixbug (885 bytes, patch)
2018-06-28 12:16 UTC, Wang Zhengqiang
committed Details | Review

Description Wang Zhengqiang 2018-06-28 12:16:50 UTC
Created attachment 372861 [details] [review]
fixbug

when I use gstreamer to record,
just like bellow:
gst-launch-1.0 pulsesrc ! capsfilter caps=audio/x-raw,rate=22050,channels=2 ! wavenc name=enc ! filesink location=input.wav
There will be many erros occur:
CRITICAL **: gst_audio_reorder_channels: assertion 'size % ((info->width * channels) / 8) == 0' failed

I hacked the code, and found the reason.
Size of gstbuffer must round to an integer number of samples, isn't it?
look at my patch, it is perfect.
Comment 1 Wang Zhengqiang 2018-06-28 12:26:28 UTC
By the way, if rate=22050,channels=1, there will be loud noise.
By patch also can resolve it.
I think it is because size of gstbuffer(441) is not round to bpf(2).
My Audio device:
00:14.0 Audio device [0403]: VIA Technologies, Inc. VT8237A/VT8251 HDA Controller [1106:3288] (rev 30)
Comment 2 Sebastian Dröge (slomo) 2018-06-29 05:38:37 UTC
commit 9f516077233dcd0986e94c769cd605b01ecba41b (HEAD -> master)
Author: wangzq <qiang_jsj@live.cn>
Date:   Thu Jun 28 20:13:04 2018 +0800

    audiobasesrc: Round down segsize to an integer number of samples
    
    https://bugzilla.gnome.org/show_bug.cgi?id=796704