Showing the changes to libavcodec/cook_parser.c (1 of 2 files). Show all
Unified · Split
| @@ -41,8 +41,8 @@ static int cook_parse(AVCodecParserContext *s1, AVCodecContext *avctx, · 40 unmodified lines | |||
| 41 | CookParseContext *s = s1->priv_data; | 41 | CookParseContext *s = s1->priv_data; |
| 42 | 42 | ||
| 43 | if (!s->duration && | 43 | if (!s->duration && |
| 44 | avctx->extradata && avctx->extradata_size >= 8 && avctx->channels) | 44 | avctx->extradata && avctx->extradata_size >= 8 && avctx->ch_layout.nb_channels) |
| 45 | s->duration = AV_RB16(avctx->extradata + 4) / avctx->channels; | 45 | s->duration = AV_RB16(avctx->extradata + 4) / avctx->ch_layout.nb_channels; |
| 46 | 46 | ||
| 47 | s1->duration = s->duration; | 47 | s1->duration = s->duration; |
| 48 | 48 | ||