mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-20 04:24:20 -04:00
[xcode] Fix for reading mono sources (ref issue #742)
This commit is contained in:
parent
cbd8d8a44d
commit
7bf90eb8cb
@ -1608,10 +1608,12 @@ transcode_frame_new(void *data, size_t size, int nsamples, struct media_quality
|
|||||||
|
|
||||||
// We don't align because the frame won't be given directly to the encoder
|
// We don't align because the frame won't be given directly to the encoder
|
||||||
// anyway, it will first go through the filter (which might align it...?)
|
// anyway, it will first go through the filter (which might align it...?)
|
||||||
ret = avcodec_fill_audio_frame(f, 2, f->format, data, size, 1);
|
ret = avcodec_fill_audio_frame(f, quality->channels, f->format, data, size, 1);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_XCODE, "Error filling frame with rawbuf, size %zu, samples %d (%d/%d/2): %s\n", size, nsamples, quality->sample_rate, quality->bits_per_sample, err2str(ret));
|
DPRINTF(E_LOG, L_XCODE, "Error filling frame with rawbuf, size %zu, samples %d (%d/%d/%d): %s\n",
|
||||||
|
size, nsamples, quality->sample_rate, quality->bits_per_sample, quality->channels, err2str(ret));
|
||||||
|
|
||||||
av_frame_free(&f);
|
av_frame_free(&f);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user