Commit 81b060fa authored by Loren Merritt's avatar Loren Merritt
Browse files

align the audio decoding buffer, since some codecs write to it with simd

Originally committed as revision 14707 to svn://
parent 72745cff
......@@ -1198,8 +1198,11 @@ static int output_packet(AVInputStream *ist, int ist_index,
if (ist->decoding_needed) {
switch(ist->st->codec->codec_type) {
samples= av_fast_realloc(samples, &samples_size, FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE));
if(pkt && samples_size < FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE)) {
samples_size = FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE);
samples= av_malloc(samples_size);
data_size= samples_size;
/* XXX: could avoid copy if PCM 16 bits with same
endianness as CPU */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment