diff options
author | wm4 <wm4@nowhere> | 2015-09-10 23:38:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-09-10 23:38:42 +0200 |
commit | e721660e6dd9b8785896dfd81519baa22ea6b2fb (patch) | |
tree | 3661739007350213cfd9f15d24a93fd725e8485e /audio/format.c | |
parent | 60a617df311fc6e56feced64143d912eb7b7099b (diff) | |
download | mpv-e721660e6dd9b8785896dfd81519baa22ea6b2fb.tar.bz2 mpv-e721660e6dd9b8785896dfd81519baa22ea6b2fb.tar.xz |
ao_lavc: use new sample format determination code
This is just a refactor, which makes it use the previously introduced
function, and allows us to make af_format_conversion_score() private.
(We drop 2 unlikely warning messages too... who cares.)
Diffstat (limited to 'audio/format.c')
-rw-r--r-- | audio/format.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/audio/format.c b/audio/format.c index e26e5b6f5b..444d4b2b74 100644 --- a/audio/format.c +++ b/audio/format.c @@ -171,13 +171,11 @@ void af_fill_silence(void *dst, size_t bytes, int format) memset(dst, af_fmt_is_unsigned(format) ? 0x80 : 0, bytes); } -#define FMT_DIFF(type, a, b) (((a) & type) - ((b) & type)) - // Returns a "score" that serves as heuristic how lossy or hard a conversion is. // If the formats are equal, 1024 is returned. If they are gravely incompatible // (like s16<->ac3), INT_MIN is returned. If there is implied loss of precision // (like s16->s8), a value <0 is returned. -int af_format_conversion_score(int dst_format, int src_format) +static int af_format_conversion_score(int dst_format, int src_format) { if (dst_format == AF_FORMAT_UNKNOWN || src_format == AF_FORMAT_UNKNOWN) return INT_MIN; |