Device name may be coma-separated list.
Use dedicated funtion to compare.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
... | ... |
@@ -2173,7 +2173,7 @@ int show_sources(void *optctx, const char *opt, const char *arg) |
2173 | 2173 |
if (fmt) { |
2174 | 2174 |
if (!strcmp(fmt->name, "lavfi")) |
2175 | 2175 |
continue; //it's pointless to probe lavfi |
2176 |
- if (dev && strcmp(fmt->name, dev)) |
|
2176 |
+ if (dev && !av_match_name(dev, fmt->name)) |
|
2177 | 2177 |
continue; |
2178 | 2178 |
print_device_sources(fmt, opts); |
2179 | 2179 |
} |
... | ... |
@@ -2181,7 +2181,7 @@ int show_sources(void *optctx, const char *opt, const char *arg) |
2181 | 2181 |
do { |
2182 | 2182 |
fmt = av_input_video_device_next(fmt); |
2183 | 2183 |
if (fmt) { |
2184 |
- if (dev && strcmp(fmt->name, dev)) |
|
2184 |
+ if (dev && !av_match_name(dev, fmt->name)) |
|
2185 | 2185 |
continue; |
2186 | 2186 |
print_device_sources(fmt, opts); |
2187 | 2187 |
} |
... | ... |
@@ -2209,7 +2209,7 @@ int show_sinks(void *optctx, const char *opt, const char *arg) |
2209 | 2209 |
do { |
2210 | 2210 |
fmt = av_output_audio_device_next(fmt); |
2211 | 2211 |
if (fmt) { |
2212 |
- if (dev && strcmp(fmt->name, dev)) |
|
2212 |
+ if (dev && !av_match_name(dev, fmt->name)) |
|
2213 | 2213 |
continue; |
2214 | 2214 |
print_device_sinks(fmt, opts); |
2215 | 2215 |
} |
... | ... |
@@ -2217,7 +2217,7 @@ int show_sinks(void *optctx, const char *opt, const char *arg) |
2217 | 2217 |
do { |
2218 | 2218 |
fmt = av_output_video_device_next(fmt); |
2219 | 2219 |
if (fmt) { |
2220 |
- if (dev && strcmp(fmt->name, dev)) |
|
2220 |
+ if (dev && !av_match_name(dev, fmt->name)) |
|
2221 | 2221 |
continue; |
2222 | 2222 |
print_device_sinks(fmt, opts); |
2223 | 2223 |
} |