Mercurial > libavcodec.hg
comparison mpeg4audio.c @ 10009:8649dc2299e2 libavcodec
Replace 5 with AOT_SBR when referring to the MPEG-4 audio object type.
author | jbr |
---|---|
date | Mon, 03 Aug 2009 02:09:23 +0000 |
parents | 8e95c7402d1a |
children | 41796cdda927 |
comparison
equal
deleted
inserted
replaced
10008:5eb52cc093e2 | 10009:8649dc2299e2 |
---|---|
56 init_get_bits(&gb, buf, buf_size*8); | 56 init_get_bits(&gb, buf, buf_size*8); |
57 c->object_type = get_object_type(&gb); | 57 c->object_type = get_object_type(&gb); |
58 c->sample_rate = get_sample_rate(&gb, &c->sampling_index); | 58 c->sample_rate = get_sample_rate(&gb, &c->sampling_index); |
59 c->chan_config = get_bits(&gb, 4); | 59 c->chan_config = get_bits(&gb, 4); |
60 c->sbr = -1; | 60 c->sbr = -1; |
61 if (c->object_type == 5) { | 61 if (c->object_type == AOT_SBR) { |
62 c->ext_object_type = c->object_type; | 62 c->ext_object_type = c->object_type; |
63 c->sbr = 1; | 63 c->sbr = 1; |
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) |
69 c->ext_object_type = 0; | 69 c->ext_object_type = 0; |
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 != 5) { | 74 if (c->ext_object_type != AOT_SBR) { |
75 int bits_left = buf_size*8 - specific_config_bitindex; | 75 int bits_left = buf_size*8 - specific_config_bitindex; |
76 for (; bits_left > 15; bits_left--) { | 76 for (; bits_left > 15; bits_left--) { |
77 if (show_bits(&gb, 11) == 0x2b7) { // sync extension | 77 if (show_bits(&gb, 11) == 0x2b7) { // sync extension |
78 get_bits(&gb, 11); | 78 get_bits(&gb, 11); |
79 c->ext_object_type = get_object_type(&gb); | 79 c->ext_object_type = get_object_type(&gb); |
80 if (c->ext_object_type == 5 && (c->sbr = get_bits1(&gb)) == 1) | 80 if (c->ext_object_type == AOT_SBR && (c->sbr = get_bits1(&gb)) == 1) |
81 c->ext_sample_rate = get_sample_rate(&gb, &c->ext_sampling_index); | 81 c->ext_sample_rate = get_sample_rate(&gb, &c->ext_sampling_index); |
82 break; | 82 break; |
83 } else | 83 } else |
84 get_bits1(&gb); // skip 1 bit | 84 get_bits1(&gb); // skip 1 bit |
85 } | 85 } |