Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 436528

Summary: media-libs/speex: Resampler stops in the middle of run with multiple channels
Product: Gentoo Linux Reporter: Franz Schrober <franzschrober>
Component: [OLD] LibraryAssignee: Gentoo Sound Team <sound>
Status: UNCONFIRMED ---    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: speex_resampler_missing_outputsamples.c.xz

Description Franz Schrober 2012-09-28 17:33:02 UTC

I noticed a quite strange behavior of speex when I resample a large input 
buffer (so underbuffering is not a problem). It stops during the call even 
when neither the number of requested out_len nor the number of provided input 
samples was reached. says something 
completely different:

"Unless an error occurs, either all input samples will be read or all output 
samples will be written to (or both)."

I've attached a test program that should show the problem. The input buffer is 
usually a lot larger, but I reduced it to keep the source file small. I get 
following output form the test program:

"Resampling stopped during processing. 2 samples missing in output and 100 
samples from input weren't used".

The example can be compiled using:

$ unxz speex_resampler_missing_outputsamples.c.xz
$ gcc speex_resampler_missing_outputsamples.c \
`pkg-config --cflags --libs speexdsp` \
-o speex_resampler_missing_outputsamples

A patch to fix this problem is attached.

Reproducible: Always
Comment 1 Franz Schrober 2012-09-28 17:33:36 UTC
Created attachment 325236 [details]
Comment 2 Franz Schrober 2012-09-28 17:34:09 UTC
Created attachment 325238 [details, diff]