From e76f503fff178a7a1726893d731735be3a4f0257 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 11 Sep 2015 09:01:49 +0200 Subject: ao_lavc: minor simplification --- audio/out/ao_lavc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/out/ao_lavc.c') diff --git a/audio/out/ao_lavc.c b/audio/out/ao_lavc.c index a89324e9b0..09bf8717a6 100644 --- a/audio/out/ao_lavc.c +++ b/audio/out/ao_lavc.c @@ -64,7 +64,7 @@ static bool supports_format(AVCodec *codec, int format) sampleformat && *sampleformat != AV_SAMPLE_FMT_NONE; ++sampleformat) { - if (format && af_from_avformat(*sampleformat) == format) + if (af_from_avformat(*sampleformat) == format) return true; } return false; @@ -75,7 +75,7 @@ static void select_format(struct ao *ao, AVCodec *codec) int formats[AF_FORMAT_COUNT]; af_get_best_sample_formats(ao->format, formats); - for (int n = 0; n < AF_FORMAT_COUNT; n++) { + for (int n = 0; formats[n]; n++) { if (supports_format(codec, formats[n])) { ao->format = formats[n]; break; -- cgit v1.2.3