aboutsummaryrefslogtreecommitdiffstats
path: root/tools/uncoded_frame.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-01-20 16:38:44 -0300
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:47 -0300
commit50e9e11316064ecdee889b18a0b6681a248edcf4 (patch)
treefc2aaab83c42a0e253cc6eea0a603141ca45eb8f /tools/uncoded_frame.c
parent7d532f474de2c9dc05e75a8bbb8fc57d11069a8f (diff)
downloadffmpeg-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.c5
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);