gst-libs/gst/audio/multichannel.c: It's okay to have caps with channels=1 and a channel position different from GST_A...

Original commit message from CVS:
* gst-libs/gst/audio/multichannel.c:
(gst_audio_check_channel_positions):
It's okay to have caps with channels=1 and a channel position
different from GST_AUDIO_CHANNEL_POSITION_FRONT_MONO
(deinterleavers might want to keep the position in the caps,
so that they can be re-interleaved again properly later).
Leave check for unexpected 2-channel layouts intact for now.
This commit is contained in:
Tim-Philipp Müller 2006-05-16 17:34:14 +00:00
parent 25bd959adb
commit 10d35563dd
2 changed files with 16 additions and 5 deletions

View file

@ -1,3 +1,13 @@
2006-05-16 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/audio/multichannel.c:
(gst_audio_check_channel_positions):
It's okay to have caps with channels=1 and a channel position
different from GST_AUDIO_CHANNEL_POSITION_FRONT_MONO
(deinterleavers might want to keep the position in the caps,
so that they can be re-interleaved again properly later).
Leave check for unexpected 2-channel layouts intact for now.
2006-05-16 Zaheer Abbas Merali <zaheerabbas at merali dot org>
* gst/tcp/gsttcp.c: (gst_tcp_socket_read):

View file

@ -108,11 +108,12 @@ gst_audio_check_channel_positions (const GstAudioChannelPosition * pos,
}
}
/* 0.8.x evilry */
if ((channels == 1 && pos[0] != GST_AUDIO_CHANNEL_POSITION_FRONT_MONO) ||
(channels == 2 && (pos[0] != GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT ||
pos[1] != GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT))) {
g_warning ("0.8.x: channels=1 implies mono; channels=2 implies stereo");
/* Throw warning if we encounter an unusual 2-channel configuration,
* at least until someone finds a reason why we should not */
if (channels == 2 && (pos[0] != GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT ||
pos[1] != GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT)) {
g_warning ("channels=2 implies stereo, but channel positions are "
"< %d, %d>", pos[0], pos[1]);
return FALSE;
}