summaryrefslogtreecommitdiff
path: root/libavcodec/wma_common.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-03 22:03:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-03 22:10:21 +0200
commit75a9859ac67b60105769fda7160db081216b70f2 (patch)
tree520b217f1254806bbe9a2634b9f0ecadb14b2a12 /libavcodec/wma_common.c
parent235d401bfa407806a468379611bd7ed23e5cd0df (diff)
parentd2a4e4b9cc9a0c2661e1c1d6f6b51babac2cec1b (diff)
downloadffmpeg-75a9859ac67b60105769fda7160db081216b70f2.tar.gz
Merge commit 'd2a4e4b9cc9a0c2661e1c1d6f6b51babac2cec1b'
* commit 'd2a4e4b9cc9a0c2661e1c1d6f6b51babac2cec1b': wma: K&R formatting cosmetics Conflicts: libavcodec/wma.c libavcodec/wmadec.c libavcodec/wmaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wma_common.c')
-rw-r--r--libavcodec/wma_common.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/libavcodec/wma_common.c b/libavcodec/wma_common.c
index 51467b203e..c01e0f4e70 100644
--- a/libavcodec/wma_common.c
+++ b/libavcodec/wma_common.c
@@ -19,6 +19,7 @@
*/
#include "libavutil/attributes.h"
+
#include "wma_common.h"
/**
@@ -31,31 +32,27 @@
av_cold int ff_wma_get_frame_len_bits(int sample_rate, int version,
unsigned int decode_flags)
{
-
int frame_len_bits;
- if (sample_rate <= 16000) {
+ if (sample_rate <= 16000)
frame_len_bits = 9;
- } else if (sample_rate <= 22050 ||
- (sample_rate <= 32000 && version == 1)) {
+ else if (sample_rate <= 22050 || (sample_rate <= 32000 && version == 1))
frame_len_bits = 10;
- } else if (sample_rate <= 48000 || version < 3) {
+ else if (sample_rate <= 48000 || version < 3)
frame_len_bits = 11;
- } else if (sample_rate <= 96000) {
+ else if (sample_rate <= 96000)
frame_len_bits = 12;
- } else {
+ else
frame_len_bits = 13;
- }
if (version == 3) {
int tmp = decode_flags & 0x6;
- if (tmp == 0x2) {
+ if (tmp == 0x2)
++frame_len_bits;
- } else if (tmp == 0x4) {
+ else if (tmp == 0x4)
--frame_len_bits;
- } else if (tmp == 0x6) {
+ else if (tmp == 0x6)
frame_len_bits -= 2;
- }
}
return frame_len_bits;