diff options
author | James Almer <jamrial@gmail.com> | 2022-01-20 16:38:44 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:47 -0300 |
commit | 50e9e11316064ecdee889b18a0b6681a248edcf4 (patch) | |
tree | fc2aaab83c42a0e253cc6eea0a603141ca45eb8f /tools/uncoded_frame.c | |
parent | 7d532f474de2c9dc05e75a8bbb8fc57d11069a8f (diff) | |
download | ffmpeg-50e9e11316064ecdee889b18a0b6681a248edcf4.tar.gz |
tools: convert to new channel layout-API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'tools/uncoded_frame.c')
-rw-r--r-- | tools/uncoded_frame.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/uncoded_frame.c b/tools/uncoded_frame.c index f441d3fbdc..edea2367c4 100644 --- a/tools/uncoded_frame.c +++ b/tools/uncoded_frame.c @@ -173,8 +173,9 @@ int main(int argc, char **argv) st->stream->codecpar->format = av_buffersink_get_format(st->sink); break; case AVMEDIA_TYPE_AUDIO: - st->stream->codecpar->channel_layout = av_buffersink_get_channel_layout(st->sink); - st->stream->codecpar->channels = av_buffersink_get_channels(st->sink); + ret = av_buffersink_get_ch_layout(st->sink, &st->stream->codecpar->ch_layout); + if (ret < 0) + goto fail; st->stream->codecpar->sample_rate = av_buffersink_get_sample_rate(st->sink); st->stream->codecpar->format = av_buffersink_get_format(st->sink); st->stream->codecpar->codec_id = av_get_pcm_codec(st->stream->codecpar->format, -1); |