From c244636850e63ef06d1353b149262da9952f5b45 Mon Sep 17 00:00:00 2001 From: Michel Verbraak Date: Mon, 13 Oct 2014 14:17:13 +0200 Subject: [PATCH] Enable changing number of channels between input and output Signed-off-by: Michel Verbraak --- src/plumbing/transcoding.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plumbing/transcoding.c b/src/plumbing/transcoding.c index 4e369d3d..df10c8dd 100644 --- a/src/plumbing/transcoding.c +++ b/src/plumbing/transcoding.c @@ -640,7 +640,7 @@ transcoder_stream_audio(transcoder_stream_t *ts, th_pkt_t *pkt) int acount = 0, maxchannels = 0, maxacount = 0; octx->channel_layout = 0; while ((octx->channel_layout == 0) && (ocodec->channel_layouts[acount] > 0)) { - if ((av_get_channel_layout_nb_channels(ocodec->channel_layouts[acount]) >= maxchannels) && (av_get_channel_layout_nb_channels(ocodec->channel_layouts[acount]) <= ictx->channels)) { + if ((av_get_channel_layout_nb_channels(ocodec->channel_layouts[acount]) >= maxchannels) && (av_get_channel_layout_nb_channels(ocodec->channel_layouts[acount]) <= octx->channels)) { maxchannels = av_get_channel_layout_nb_channels(ocodec->channel_layouts[acount]); maxacount = acount; } @@ -1554,7 +1554,7 @@ transcoder_init_audio(transcoder_t *t, streaming_start_component_t *ssc) // resampling not implemented yet if(tp->tp_channels > 0) - as->aud_channels = 0; //tp->tp_channels; + as->aud_channels = tp->tp_channels; else as->aud_channels = 0;