diff mbox series

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

Message ID MN2PR04MB5981621578B9845C8DE2822EBAB79@MN2PR04MB5981.namprd04.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,1/5] avfilter/avfilter: Add avfilter_alloc() and avfilter_query_formats() for initializing filters without a graph
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Soft Works Oct. 13, 2021, 4:49 a.m. UTC
Signed-off-by: softworkz <softworkz@hotmail.com>
---
 libavfilter/avf_aphasemeter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Oct. 13, 2021, 7:15 a.m. UTC | #1
why is this needed?
diff mbox series

Patch

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);