[vlc-commits] RTP: set audio channels directly rather than channels count
Rémi Denis-Courmont
git at videolan.org
Sat Mar 3 21:49:11 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 3 22:48:38 2012 +0200| [b3c3ae3d7aec847e7e28898e5c5ff62a81a5616c] | committer: Rémi Denis-Courmont
RTP: set audio channels directly rather than channels count
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b3c3ae3d7aec847e7e28898e5c5ff62a81a5616c
---
modules/access/rtp/rtp.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c
index 1692166..6cb8927 100644
--- a/modules/access/rtp/rtp.c
+++ b/modules/access/rtp/rtp.c
@@ -478,7 +478,8 @@ static void *pcmu_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_MULAW);
fmt.audio.i_rate = 8000;
- fmt.audio.i_channels = 1;
+ fmt.audio.i_original_channels =
+ fmt.audio.i_physical_channels = AOUT_CHAN_CENTER;
return codec_init (demux, &fmt);
}
@@ -491,7 +492,8 @@ static void *gsm_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_GSM);
fmt.audio.i_rate = 8000;
- fmt.audio.i_channels = 1;
+ fmt.audio.i_original_channels =
+ fmt.audio.i_physical_channels = AOUT_CHAN_CENTER;
return codec_init (demux, &fmt);
}
@@ -504,7 +506,8 @@ static void *pcma_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_ALAW);
fmt.audio.i_rate = 8000;
- fmt.audio.i_channels = 1;
+ fmt.audio.i_original_channels =
+ fmt.audio.i_physical_channels = AOUT_CHAN_CENTER;
return codec_init (demux, &fmt);
}
@@ -517,7 +520,8 @@ static void *l16s_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_S16B);
fmt.audio.i_rate = 44100;
- fmt.audio.i_channels = 2;
+ fmt.audio.i_original_channels =
+ fmt.audio.i_physical_channels = AOUT_CHANS_STEREO;
return codec_init (demux, &fmt);
}
@@ -527,7 +531,8 @@ static void *l16m_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_S16B);
fmt.audio.i_rate = 44100;
- fmt.audio.i_channels = 1;
+ fmt.audio.i_original_channels =
+ fmt.audio.i_physical_channels = AOUT_CHAN_CENTER;
return codec_init (demux, &fmt);
}
@@ -540,7 +545,8 @@ static void *qcelp_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_QCELP);
fmt.audio.i_rate = 8000;
- fmt.audio.i_channels = 1;
+ fmt.audio.i_original_channels =
+ fmt.audio.i_physical_channels = AOUT_CHAN_CENTER;
return codec_init (demux, &fmt);
}
@@ -552,7 +558,8 @@ static void *mpa_init (demux_t *demux)
es_format_t fmt;
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_MPGA);
- fmt.audio.i_channels = 2;
+ fmt.audio.i_original_channels =
+ fmt.audio.i_physical_channels = AOUT_CHANS_STEREO;
fmt.b_packetized = false;
return codec_init (demux, &fmt);
}
More information about the vlc-commits
mailing list