aboutsummaryrefslogtreecommitdiffstats
path: root/examples/alffplay.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-12-12 06:10:23 -0800
committerChris Robinson <[email protected]>2014-12-12 06:10:23 -0800
commite60e0761f5d50206dc121703a7ead2619fb5bedc (patch)
tree015f8a4431c83883120b55a89c4ddd70fcebd56b /examples/alffplay.c
parent05529d66aeb8290bcda578650b2c99048ee8a278 (diff)
Use the default channel layout in alffplay if one isn't specified
Diffstat (limited to 'examples/alffplay.c')
-rw-r--r--examples/alffplay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/alffplay.c b/examples/alffplay.c
index 25128d68..17f6d3bc 100644
--- a/examples/alffplay.c
+++ b/examples/alffplay.c
@@ -684,7 +684,9 @@ static int audio_thread(void *userdata)
movState->audio.dst_ch_layout,
movState->audio.dst_sample_fmt,
movState->audio.st->codec->sample_rate,
- movState->audio.st->codec->channel_layout,
+ movState->audio.st->codec->channel_layout ?
+ movState->audio.st->codec->channel_layout :
+ av_get_default_channel_layout(movState->audio.st->codec->channels),
movState->audio.st->codec->sample_fmt,
movState->audio.st->codec->sample_rate,
0, NULL