diff mbox series

[FFmpeg-devel] avfilter/avfilter: Fix build with ASSERT_LEVEL >= 1

Message ID AS8P250MB0744583B5B441445FF2BDA048F4E2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit e7f9edb4698e94135aab24c302226734713548f0
Headers show
Series [FFmpeg-devel] avfilter/avfilter: Fix build with ASSERT_LEVEL >= 1 | expand

Checks

Context Check Description
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_fate_x86 success Make fate finished
yinshiyou/make_loongarch64 warning New warnings during build
andriy/make_x86 warning New warnings during build

Commit Message

Andreas Rheinhardt Feb. 14, 2024, 2:37 p.m. UTC
Broken in 86417b759f789383ab658e2eb90890477a79eedf.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/avfilter.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 1ea70578c4..9fe249f3f9 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -1079,7 +1079,7 @@  static int take_samples(FilterLinkInternal *li, unsigned min, unsigned max,
 
     /* Note: this function relies on no format changes and must only be
        called with enough samples. */
-    av_assert1(samples_ready(link, link->min_samples));
+    av_assert1(samples_ready(li, link->min_samples));
     frame0 = frame = ff_framequeue_peek(&li->fifo, 0);
     if (!li->fifo.samples_skipped && frame->nb_samples >= min && frame->nb_samples <= max) {
         *rframe = ff_framequeue_take(&li->fifo);
@@ -1136,7 +1136,7 @@  static int ff_filter_frame_to_filter(AVFilterLink *link)
     AVFilterContext *dst = link->dst;
     int ret;
 
-    av_assert1(ff_framequeue_queued_frames(&link->fifo));
+    av_assert1(ff_framequeue_queued_frames(&li->fifo));
     ret = link->min_samples ?
           ff_inlink_consume_samples(link, link->min_samples, link->max_samples, &frame) :
           ff_inlink_consume_frame(link, &frame);
@@ -1561,8 +1561,9 @@  FF_ENABLE_DEPRECATION_WARNINGS
 
 void ff_inlink_request_frame(AVFilterLink *link)
 {
-    av_assert1(!link->status_in);
-    av_assert1(!link->status_out);
+    FilterLinkInternal *li = ff_link_internal(link);
+    av_assert1(!li->status_in);
+    av_assert1(!li->status_out);
     link->frame_wanted_out = 1;
     ff_filter_set_ready(link->src, 100);
 }