Mercurial > libavcodec.hg
comparison dca.c @ 8101:38c1cbbb4245 libavcodec
Guess channel layout based on the number of channels if a custom layout is specified in amode.
author | banan |
---|---|
date | Sat, 01 Nov 2008 20:49:37 +0000 |
parents | 8d08a75eac3d |
children | 04295cbc0e9b |
comparison
equal
deleted
inserted
replaced
8100:8d08a75eac3d | 8101:38c1cbbb4245 |
---|---|
1213 s->output = DCA_STEREO; | 1213 s->output = DCA_STEREO; |
1214 avctx->channel_layout = CHANNEL_LAYOUT_STEREO; | 1214 avctx->channel_layout = CHANNEL_LAYOUT_STEREO; |
1215 } | 1215 } |
1216 if (s->amode<16) | 1216 if (s->amode<16) |
1217 avctx->channel_layout = dca_core_channel_layout[s->amode]; | 1217 avctx->channel_layout = dca_core_channel_layout[s->amode]; |
1218 else { | |
1219 av_log(avctx, AV_LOG_ERROR, "Custom channel layouts not supported\n"); | |
1220 //Maybe just guess layout depending on the channel count | |
1221 return -1; | |
1222 } | |
1223 | 1218 |
1224 if (s->lfe) avctx->channel_layout |= CHANNEL_LOW_FREQUENCY; | 1219 if (s->lfe) avctx->channel_layout |= CHANNEL_LOW_FREQUENCY; |
1225 | 1220 |
1226 /* There is nothing that prevents a dts frame to change channel configuration | 1221 /* There is nothing that prevents a dts frame to change channel configuration |
1227 but FFmpeg doesn't support that so only set the channels if it is previously | 1222 but FFmpeg doesn't support that so only set the channels if it is previously |