cook: convert to new channel layout API

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
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 cdde7fe415
commit fa0c8a753e
2 changed files with 16 additions and 13 deletions

View file

@ -41,8 +41,8 @@ static int cook_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
CookParseContext *s = s1->priv_data;
if (!s->duration &&
avctx->extradata && avctx->extradata_size >= 8 && avctx->channels)
s->duration = AV_RB16(avctx->extradata + 4) / avctx->channels;
avctx->extradata && avctx->extradata_size >= 8 && avctx->ch_layout.nb_channels)
s->duration = AV_RB16(avctx->extradata + 4) / avctx->ch_layout.nb_channels;
s1->duration = s->duration;