Mercurial > libavcodec.hg
comparison vorbis_dec.c @ 11051:5d4991dd23de libavcodec
Add support for vorbis 6.1 and 7.1 channel configurations as per the new spec
http://xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9
author | superdump |
---|---|
date | Fri, 29 Jan 2010 13:51:25 +0000 |
parents | fe81255af588 |
children | 4b3da727d832 |
comparison
equal
deleted
inserted
replaced
11050:170c9ce34d14 | 11051:5d4991dd23de |
---|---|
982 av_log(avccontext, AV_LOG_ERROR, "Setup header corrupt.\n"); | 982 av_log(avccontext, AV_LOG_ERROR, "Setup header corrupt.\n"); |
983 vorbis_free(vc); | 983 vorbis_free(vc); |
984 return -1; | 984 return -1; |
985 } | 985 } |
986 | 986 |
987 if (vc->audio_channels > 6) | 987 if (vc->audio_channels > 8) |
988 avccontext->channel_layout = 0; | 988 avccontext->channel_layout = 0; |
989 else | 989 else |
990 avccontext->channel_layout = ff_vorbis_channel_layouts[vc->audio_channels - 1]; | 990 avccontext->channel_layout = ff_vorbis_channel_layouts[vc->audio_channels - 1]; |
991 | 991 |
992 avccontext->channels = vc->audio_channels; | 992 avccontext->channels = vc->audio_channels; |
1614 return buf_size ; | 1614 return buf_size ; |
1615 } | 1615 } |
1616 | 1616 |
1617 AV_DEBUG("parsed %d bytes %d bits, returned %d samples (*ch*bits) \n", get_bits_count(gb)/8, get_bits_count(gb)%8, len); | 1617 AV_DEBUG("parsed %d bytes %d bits, returned %d samples (*ch*bits) \n", get_bits_count(gb)/8, get_bits_count(gb)%8, len); |
1618 | 1618 |
1619 if (vc->audio_channels > 6) { | 1619 if (vc->audio_channels > 8) { |
1620 for (i = 0; i < vc->audio_channels; i++) | 1620 for (i = 0; i < vc->audio_channels; i++) |
1621 channel_ptrs[i] = vc->channel_floors + i * len; | 1621 channel_ptrs[i] = vc->channel_floors + i * len; |
1622 } else { | 1622 } else { |
1623 for (i = 0; i < vc->audio_channels; i++) | 1623 for (i = 0; i < vc->audio_channels; i++) |
1624 channel_ptrs[i] = vc->channel_floors + | 1624 channel_ptrs[i] = vc->channel_floors + |