shorten: convert to new channel layout API

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Anton Khirnov 2013-05-07 07:20:32 +02:00 committed by James Almer
parent b7483d02c2
commit fb722bab3e
1 changed files with 5 additions and 1 deletions

View File

@ -428,7 +428,11 @@ static int read_header(ShortenContext *s)
s->channels = 0;
return AVERROR_INVALIDDATA;
}
s->avctx->channels = s->channels;
if (s->avctx->ch_layout.nb_channels != s->channels) {
av_channel_layout_uninit(&s->avctx->ch_layout);
s->avctx->ch_layout.nb_channels = s->channels;
s->avctx->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
}
/* get blocksize if version > 0 */
if (s->version > 0) {