diff options
author | wm4 <wm4@nowhere> | 2015-06-26 23:06:37 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-26 23:06:37 +0200 |
commit | 6147bcce359358855ad02d8d5cbd6575d39b0449 (patch) | |
tree | 5cb8bafc418cd71b68f95766ad01b3312feed518 /audio/audio.c | |
parent | d6737c5fab489964558b1eed934969c4f151912d (diff) | |
download | mpv-6147bcce359358855ad02d8d5cbd6575d39b0449.tar.bz2 mpv-6147bcce359358855ad02d8d5cbd6575d39b0449.tar.xz |
audio: fix format function consistency issues
Replace all the check macros with function calls. Give them all the
same case and naming schema.
Drop af_fmt2bits(). Only af_fmt2bps() survives as af_fmt_to_bytes().
Introduce af_fmt_is_pcm(), and use it in situations that used
!AF_FORMAT_IS_SPECIAL. Nobody really knew what a "special" format
was. It simply meant "not PCM".
Diffstat (limited to 'audio/audio.c')
-rw-r--r-- | audio/audio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/audio.c b/audio/audio.c index c4ffc233a1..f84d6054bc 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -34,8 +34,8 @@ static void update_redundant_info(struct mp_audio *mpa) assert(mp_chmap_is_empty(&mpa->channels) || mp_chmap_is_valid(&mpa->channels)); mpa->nch = mpa->channels.num; - mpa->bps = af_fmt2bps(mpa->format); - if (AF_FORMAT_IS_PLANAR(mpa->format)) { + mpa->bps = af_fmt_to_bytes(mpa->format); + if (af_fmt_is_planar(mpa->format)) { mpa->spf = 1; mpa->num_planes = mpa->nch; mpa->sstride = mpa->bps; @@ -105,7 +105,7 @@ char *mp_audio_config_to_str_buf(char *buf, size_t buf_sz, struct mp_audio *mpa) void mp_audio_force_interleaved_format(struct mp_audio *mpa) { - if (AF_FORMAT_IS_PLANAR(mpa->format)) + if (af_fmt_is_planar(mpa->format)) mp_audio_set_format(mpa, af_fmt_from_planar(mpa->format)); } |