From 151bc166444ba1a8aaaaa651532f42e3a3741061 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 19 Apr 2021 09:28:28 +0200 Subject: [PATCH] Use strlist_contains() to find a muxer The AVOutputFormat name is a string list: it contains names separated by ',' (possibly only one). --- app/src/recorder.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/recorder.c b/app/src/recorder.c index e33d1a3b..91390ff1 100644 --- a/app/src/recorder.c +++ b/app/src/recorder.c @@ -4,6 +4,7 @@ #include #include "util/log.h" +#include "util/str_util.h" /** Downcast packet_sink to recorder */ #define DOWNCAST(SINK) container_of(SINK, struct recorder, packet_sink) @@ -22,8 +23,8 @@ find_muxer(const char *name) { #else oformat = av_oformat_next(oformat); #endif - // until null or with having the requested name - } while (oformat && strcmp(oformat->name, name)); + // until null or containing the requested name + } while (oformat && !strlist_contains(oformat->name, ',', name)); return oformat; }