diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2008-07-16 00:50:12 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2008-07-16 00:50:12 +0000 |
commit | 5eb0f2a425b6e1e0f821b52972b7af75de3480e2 (patch) | |
tree | c9c2a4f69dbb2b5c37e887cbc55e3c6479af108d /libavcodec/vorbis_dec.c | |
parent | 633d9def9d53de2ccc1116936f6b1d250b8fd055 (diff) | |
download | ffmpeg-5eb0f2a425b6e1e0f821b52972b7af75de3480e2.tar.gz |
float_to_int16_interleave: change src to an array of pointers instead of assuming it's contiguous.
this has no immediate effect, but will allow it to be used in more codecs.
Originally committed as revision 14252 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_dec.c')
-rw-r--r-- | libavcodec/vorbis_dec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c index a338141b92..0f0c17b617 100644 --- a/libavcodec/vorbis_dec.c +++ b/libavcodec/vorbis_dec.c @@ -1553,6 +1553,8 @@ static int vorbis_decode_frame(AVCodecContext *avccontext, { vorbis_context *vc = avccontext->priv_data ; GetBitContext *gb = &(vc->gb); + const float *channel_ptrs[vc->audio_channels]; + int i; int_fast16_t len; @@ -1579,7 +1581,9 @@ static int vorbis_decode_frame(AVCodecContext *avccontext, AV_DEBUG("parsed %d bytes %d bits, returned %d samples (*ch*bits) \n", get_bits_count(gb)/8, get_bits_count(gb)%8, len); - vc->dsp.float_to_int16_interleave(data, vc->channel_residues, len, vc->audio_channels); + for(i=0; i<vc->audio_channels; i++) + channel_ptrs[i] = vc->channel_residues+i*len; + vc->dsp.float_to_int16_interleave(data, channel_ptrs, len, vc->audio_channels); *data_size=len*2*vc->audio_channels; return buf_size ; |