Okay, will try this when I am back at home :) Do you know an good source for informations about what exaktly "16bit alignment" means? i always thought it just means my buffersize must be dividable by 16.. But I think that's not right, eh? ^^
thanks, Aya On 04.08.2010, at 13:04, avcoder <[email protected]> wrote: > On Wed, Aug 4, 2010 at 6:58 PM, Aya Koshigaya <[email protected]> wrote: >> Hi, >> >> Thanks for your answer. >> >>> DECLARE_ALIGNED(16,uint8_t,audio_buf)[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / >>> 2]; >>> int data_size = sizeof(audio_buf); >>> int len = avcodec_decode_audio3(dec,(int16_t *)audio_buf, >>> &data_size,your_packet); >> >> I can test this when I am back at home, but.. My current code looks >> something like this: >> >> unsigned int bufferSize = AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2; >> unsigned char buffer[bufferSize]; >> int len = avcodec_decode_audio3(decoder, buffer, &bufferSize, myPacket); >> >> That's basically the same, isn't it? > > No, your 'buffer' is not aligned to 16 bytes > > try the following code: > > unsigned char buffer_temp[bufferSize+15]; > unsigned char *buffer = (unsigned char *)(((int)buffer_temp+15) &~15); > > -- > ----------------------------------------------------------------------------------------- > My key fingerprint: d1:03:f5:32:26:ff:d7:3c:e4:42:e3:51:ec:92:78:b2 > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
