diff options
author | wm4 <wm4@nowhere> | 2015-09-11 09:01:49 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-09-11 09:01:49 +0200 |
commit | e76f503fff178a7a1726893d731735be3a4f0257 (patch) | |
tree | fa1fcf7332423dfb78326e5ff98d95736bd4193c /audio/out/ao_lavc.c | |
parent | 1557d2d470757fa872c9d3e13993a4f9e2f693f9 (diff) | |
download | mpv-e76f503fff178a7a1726893d731735be3a4f0257.tar.bz2 mpv-e76f503fff178a7a1726893d731735be3a4f0257.tar.xz |
ao_lavc: minor simplification
Diffstat (limited to 'audio/out/ao_lavc.c')
-rw-r--r-- | audio/out/ao_lavc.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |