Use strlist_contains() to find a muxer
The AVOutputFormat name is a string list: it contains names separated by ',' (possibly only one).
This commit is contained in:
parent
ffc00210e9
commit
151bc16644
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include <libavutil/time.h>
|
#include <libavutil/time.h>
|
||||||
|
|
||||||
#include "util/log.h"
|
#include "util/log.h"
|
||||||
|
#include "util/str_util.h"
|
||||||
|
|
||||||
/** Downcast packet_sink to recorder */
|
/** Downcast packet_sink to recorder */
|
||||||
#define DOWNCAST(SINK) container_of(SINK, struct recorder, packet_sink)
|
#define DOWNCAST(SINK) container_of(SINK, struct recorder, packet_sink)
|
||||||
|
@ -22,8 +23,8 @@ find_muxer(const char *name) {
|
||||||
#else
|
#else
|
||||||
oformat = av_oformat_next(oformat);
|
oformat = av_oformat_next(oformat);
|
||||||
#endif
|
#endif
|
||||||
// until null or with having the requested name
|
// until null or containing the requested name
|
||||||
} while (oformat && strcmp(oformat->name, name));
|
} while (oformat && !strlist_contains(oformat->name, ',', name));
|
||||||
return oformat;
|
return oformat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue