mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 22:55:56 -05:00
Fix bug where streams with sample rate < 44100 stop too early (with libav 10+)
- avresample_convert should be passed max samples to convert, not number of samples in input (which for low sample rates is lower than output)
This commit is contained in:
parent
129c00c3d1
commit
17ffdc56ad
@ -285,7 +285,7 @@ transcode(struct transcode_ctx *ctx, struct evbuffer *evbuf, int wanted)
|
||||
{
|
||||
av_samples_get_buffer_size(&out_linesize, 2, frame->nb_samples, AV_SAMPLE_FMT_S16, 0);
|
||||
|
||||
out_samples = avresample_convert(ctx->resample_ctx, (uint8_t **)&ctx->re_abuffer, out_linesize, frame->nb_samples,
|
||||
out_samples = avresample_convert(ctx->resample_ctx, (uint8_t **)&ctx->re_abuffer, out_linesize, XCODE_BUFFER_SIZE,
|
||||
(uint8_t **)frame->data, frame->linesize[0], frame->nb_samples);
|
||||
if (out_samples < 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user