mirror of https://github.com/mpv-player/mpv
f_lavfi: use new libavfilter iteration API
This commit is contained in:
parent
c338c0d90a
commit
428fc1cbef
|
@ -160,7 +160,6 @@ void init_libav(struct mpv_global *global)
|
|||
pthread_mutex_unlock(&log_lock);
|
||||
|
||||
avformat_network_init();
|
||||
avfilter_register_all();
|
||||
|
||||
#if HAVE_LIBAVDEVICE
|
||||
avdevice_register_all();
|
||||
|
|
|
@ -906,9 +906,11 @@ static bool is_usable(const AVFilter *filter, int media_type)
|
|||
static void dump_list(struct mp_log *log, int media_type)
|
||||
{
|
||||
mp_info(log, "Available libavfilter filters:\n");
|
||||
for (const AVFilter *filter = avfilter_next(NULL); filter;
|
||||
filter = avfilter_next(filter))
|
||||
{
|
||||
void *iter = NULL;
|
||||
for (;;) {
|
||||
const AVFilter *filter = av_filter_iterate(&iter);
|
||||
if (!filter)
|
||||
break;
|
||||
if (is_usable(filter, media_type))
|
||||
mp_info(log, " %-16s %s\n", filter->name, filter->description);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue