ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Tue Aug 17 06:00:16 2021 +0200| [f60c3ca1361921ff7929a4dc14ed874f22f37f98] | 
committer: Andreas Rheinhardt

avfilter/audio: Don't call av_get_channel_layout_nb_channels twice

Also makes the assert-string shorter.

Reviewed-by: Nicolas George <geo...@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f60c3ca1361921ff7929a4dc14ed874f22f37f98
---

 libavfilter/audio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/audio.c b/libavfilter/audio.c
index 5289b94067..cebc9709dd 100644
--- a/libavfilter/audio.c
+++ b/libavfilter/audio.c
@@ -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,

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to