diff options
author | James Almer <jamrial@gmail.com> | 2022-01-20 17:47:51 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:47 -0300 |
commit | f5ef91e02080316f50d606f5b0b03333bb627ed7 (patch) | |
tree | d6338f72a9ee59dfbf29024ae5d5a5aa29d81ce9 /doc/examples/decode_audio.c | |
parent | 50e9e11316064ecdee889b18a0b6681a248edcf4 (diff) |
doc/examples: convert to new channel layout-API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'doc/examples/decode_audio.c')
-rw-r--r-- | doc/examples/decode_audio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/examples/decode_audio.c b/doc/examples/decode_audio.c index 6c2a8ed550..49ad22cba6 100644 --- a/doc/examples/decode_audio.c +++ b/doc/examples/decode_audio.c @@ -97,7 +97,7 @@ static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, exit(1); } for (i = 0; i < frame->nb_samples; i++) - for (ch = 0; ch < dec_ctx->channels; ch++) + for (ch = 0; ch < dec_ctx->ch_layout.nb_channels; ch++) fwrite(frame->data[ch] + data_size*i, 1, data_size, outfile); } } @@ -215,7 +215,7 @@ int main(int argc, char **argv) sfmt = av_get_packed_sample_fmt(sfmt); } - n_channels = c->channels; + n_channels = c->ch_layout.nb_channels; if ((ret = get_format_from_sample_fmt(&fmt, sfmt)) < 0) goto end; |