mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-14 19:25:01 +00:00
fix decoding of big audio packets (48k 16bit 2 channels), needed size is related to samples which is short * while len passed to decode_audio2 is related to pkt->data which is uint8_t *
Originally committed as revision 8537 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
c367d06702
commit
5508d26b7c
2
ffmpeg.c
2
ffmpeg.c
@ -1049,7 +1049,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
|
||||
switch(ist->st->codec->codec_type) {
|
||||
case CODEC_TYPE_AUDIO:{
|
||||
if(pkt)
|
||||
samples= av_fast_realloc(samples, &samples_size, FFMAX(pkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE));
|
||||
samples= av_fast_realloc(samples, &samples_size, FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE));
|
||||
data_size= samples_size;
|
||||
/* XXX: could avoid copy if PCM 16 bits with same
|
||||
endianness as CPU */
|
||||
|
Loading…
Reference in New Issue
Block a user