[FFmpeg-devel] [PATCH 3/5] avfilter/aphasemeter: add null check

Soft Works softworkz at hotmail.com
Wed Oct 13 07:49:59 EEST 2021


Signed-off-by: softworkz <softworkz at hotmail.com>
---
 libavfilter/avf_aphasemeter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/avf_aphasemeter.c b/libavfilter/avf_aphasemeter.c
index d9302cf867..eca8751258 100644
--- a/libavfilter/avf_aphasemeter.c
+++ b/libavfilter/avf_aphasemeter.c
@@ -111,7 +111,7 @@ static int query_formats(AVFilterContext *ctx)
         (ret = ff_formats_ref(formats, &outlink->incfg.samplerates)) < 0)
         return ret;
 
-    if (s->do_video) {
+    if (s->do_video && ctx->nb_outputs >= 2) {
         AVFilterLink *outlink = ctx->outputs[1];
 
         formats = ff_make_format_list(pix_fmts);
-- 
2.30.2.windows.1



More information about the ffmpeg-devel mailing list