diff options
author | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-12-22 00:42:10 +0300 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2015-01-11 20:58:33 +0300 |
commit | f463df18bc867d681d1ac6bf3dc6282ec471485c (patch) | |
tree | 7af1e19aeca137bfbd4c4fe61d52ab98ec172dae /cmdutils.c | |
parent | ea0ac11f1bf1909f369a9d7d2a26709412fc55f5 (diff) |
cmdutils: use av_match_name to filter devices
Device name may be coma-separated list.
Use dedicated funtion to compare.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmdutils.c b/cmdutils.c index 3370eb8935..53268d8a29 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -2173,7 +2173,7 @@ int show_sources(void *optctx, const char *opt, const char *arg) if (fmt) { if (!strcmp(fmt->name, "lavfi")) continue; //it's pointless to probe lavfi - if (dev && strcmp(fmt->name, dev)) + if (dev && !av_match_name(dev, fmt->name)) continue; print_device_sources(fmt, opts); } @@ -2181,7 +2181,7 @@ int show_sources(void *optctx, const char *opt, const char *arg) do { fmt = av_input_video_device_next(fmt); if (fmt) { - if (dev && strcmp(fmt->name, dev)) + if (dev && !av_match_name(dev, fmt->name)) continue; print_device_sources(fmt, opts); } @@ -2209,7 +2209,7 @@ int show_sinks(void *optctx, const char *opt, const char *arg) do { fmt = av_output_audio_device_next(fmt); if (fmt) { - if (dev && strcmp(fmt->name, dev)) + if (dev && !av_match_name(dev, fmt->name)) continue; print_device_sinks(fmt, opts); } @@ -2217,7 +2217,7 @@ int show_sinks(void *optctx, const char *opt, const char *arg) do { fmt = av_output_video_device_next(fmt); if (fmt) { - if (dev && strcmp(fmt->name, dev)) + if (dev && !av_match_name(dev, fmt->name)) continue; print_device_sinks(fmt, opts); } |