From 7d1d52e8f0b8d7c39b649697e813501778c62495 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 20 Mar 2016 19:22:16 +0100 Subject: [PATCH] [transcode] Fix missing channel number for newer ffmpeg (closes #241) --- src/transcode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/transcode.c b/src/transcode.c index 9b7a29f7..c8273a78 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -1671,6 +1671,9 @@ transcode_raw2frame(uint8_t *data, size_t size) frame->nb_samples = size / 4; frame->format = AV_SAMPLE_FMT_S16; frame->channel_layout = AV_CH_LAYOUT_STEREO; +#ifdef HAVE_FFMPEG + frame->channels = 2; +#endif frame->pts = AV_NOPTS_VALUE; frame->sample_rate = 44100;