f_lavfi: use new libavfilter iteration API

This commit is contained in:
wm4 2018-04-03 18:05:47 +02:00 committed by Jan Ekström
parent c338c0d90a
commit 428fc1cbef
3 changed files with 6 additions and 5 deletions

View File

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

View File

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

View File

@ -416,7 +416,7 @@ ffmpeg_pkg_config_checks = [
'libavcodec', '>= 58.16.100',
'libavformat', '>= 58.9.100',
'libswscale', '>= 5.0.101',
'libavfilter', '>= 7.0.101',
'libavfilter', '>= 7.14.100',
'libswresample', '>= 3.0.100',
]
libav_pkg_config_checks = [