summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2012-03-27 22:28:28 +0200
committerMarton Balint <cus@passwd.hu>2012-05-29 22:41:50 +0200
commit15751e3fdd66f595f25692d180d6f154af2da11c (patch)
treec4b941f2aacd091e7ea4786b8e6a44bafecf2811 /ffplay.c
parenta6f51de3bf5110dad301bab625f67fc2172f286d (diff)
ffplay: only request 4 or 6 channels from SDL, if SDL version is at least 1.2.8
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index 44ae931601..2fae0e5996 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2299,7 +2299,7 @@ static int stream_component_open(VideoState *is, int stream_index)
wanted_channel_layout &= ~AV_CH_LAYOUT_STEREO_DOWNMIX;
wanted_nb_channels = av_get_channel_layout_nb_channels(wanted_channel_layout);
/* SDL only supports 1, 2, 4 or 6 channels at the moment, so we have to make sure not to request anything else. */
- while (wanted_nb_channels > 0 && (wanted_nb_channels == 3 || wanted_nb_channels == 5 || wanted_nb_channels > 6)) {
+ while (wanted_nb_channels > 0 && (wanted_nb_channels == 3 || wanted_nb_channels == 5 || wanted_nb_channels > (SDL_VERSION_ATLEAST(1, 2, 8) ? 6 : 2))) {
wanted_nb_channels--;
wanted_channel_layout = av_get_default_channel_layout(wanted_nb_channels);
}