]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Enable changing number of channels between input and output
authorMichel Verbraak <info@1st-setup.nl>
Mon, 13 Oct 2014 12:17:13 +0000 (14:17 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 13 Oct 2014 13:31:58 +0000 (15:31 +0200)
Signed-off-by: Michel Verbraak <info@1st-setup.nl>
src/plumbing/transcoding.c

index 4e369d3dff4d17eacc6816049a5ff1840824881c..df10c8ddb6388180ea3ac6711e2684303c5301da 100644 (file)
@@ -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;