comparison mpeg4audio.c @ 10064:41796cdda927 libavcodec

Use the AOT enum instead of integer literals for setting and comparing audio object types.
author alexc
date Mon, 17 Aug 2009 00:17:58 +0000
parents 8649dc2299e2
children d7ac0d3ddd95
comparison
equal deleted inserted replaced
10063:669776b7b051 10064:41796cdda927
34 }; 34 };
35 35
36 static inline int get_object_type(GetBitContext *gb) 36 static inline int get_object_type(GetBitContext *gb)
37 { 37 {
38 int object_type = get_bits(gb, 5); 38 int object_type = get_bits(gb, 5);
39 if (object_type == 31) 39 if (object_type == AOT_ESCAPE)
40 object_type = 32 + get_bits(gb, 6); 40 object_type = 32 + get_bits(gb, 6);
41 return object_type; 41 return object_type;
42 } 42 }
43 43
44 static inline int get_sample_rate(GetBitContext *gb, int *index) 44 static inline int get_sample_rate(GetBitContext *gb, int *index)
64 c->ext_sample_rate = get_sample_rate(&gb, &c->ext_sampling_index); 64 c->ext_sample_rate = get_sample_rate(&gb, &c->ext_sampling_index);
65 c->object_type = get_object_type(&gb); 65 c->object_type = get_object_type(&gb);
66 if (c->object_type == AOT_ER_BSAC) 66 if (c->object_type == AOT_ER_BSAC)
67 c->ext_chan_config = get_bits(&gb, 4); 67 c->ext_chan_config = get_bits(&gb, 4);
68 } else { 68 } else {
69 c->ext_object_type = 0; 69 c->ext_object_type = AOT_NULL;
70 c->ext_sample_rate = 0; 70 c->ext_sample_rate = 0;
71 } 71 }
72 specific_config_bitindex = get_bits_count(&gb); 72 specific_config_bitindex = get_bits_count(&gb);
73 73
74 if (c->ext_object_type != AOT_SBR) { 74 if (c->ext_object_type != AOT_SBR) {