summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2012-01-04 22:50:09 +0100
committerMarton Balint <cus@passwd.hu>2012-01-05 20:04:23 +0100
commit8ee77fc8d4034924c4151304e274bf65809aec39 (patch)
tree6d2219f7c4f9a836a23101388d4ac8427ddf5b1c /ffplay.c
parent5d94f28e9e726ea622aed43f5bdeb957e50b8917 (diff)
ffplay: fix invalid wanted_channel_layout calculation
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 46426e74f4..1a1b3f714b 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2263,7 +2263,7 @@ static int stream_component_open(VideoState *is, int stream_index)
if (env)
wanted_channel_layout = av_get_default_channel_layout(SDL_atoi(env));
if (!wanted_channel_layout) {
- wanted_channel_layout = (avctx->channel_layout && avctx->channels == av_get_channel_layout_nb_channels(avctx->channels)) ? avctx->channel_layout : av_get_default_channel_layout(avctx->channels);
+ wanted_channel_layout = (avctx->channel_layout && avctx->channels == av_get_channel_layout_nb_channels(avctx->channel_layout)) ? avctx->channel_layout : av_get_default_channel_layout(avctx->channels);
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. */