mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avfilter/audio: Don't call av_get_channel_layout_nb_channels twice
Also makes the assert-string shorter. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
1aa640c7d7
commit
f60c3ca136
@ -40,8 +40,9 @@ AVFrame *ff_default_get_audio_buffer(AVFilterLink *link, int nb_samples)
|
||||
{
|
||||
AVFrame *frame = NULL;
|
||||
int channels = link->channels;
|
||||
int channel_layout_nb_channels = av_get_channel_layout_nb_channels(link->channel_layout);
|
||||
|
||||
av_assert0(channels == av_get_channel_layout_nb_channels(link->channel_layout) || !av_get_channel_layout_nb_channels(link->channel_layout));
|
||||
av_assert0(channels == channel_layout_nb_channels || !channel_layout_nb_channels);
|
||||
|
||||
if (!link->frame_pool) {
|
||||
link->frame_pool = ff_frame_pool_audio_init(av_buffer_allocz, channels,
|
||||
|
Loading…
Reference in New Issue
Block a user