You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-30 22:24:04 +02:00
Only realloc() bitstream buffer when the needed size increased,
this is needed to prevent loosing bitstream data with large metadata. Originally committed as revision 14279 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -139,6 +139,7 @@ static void allocate_buffers(FLACContext *s){
|
|||||||
s->decoded[i] = av_realloc(s->decoded[i], sizeof(int32_t)*s->max_blocksize);
|
s->decoded[i] = av_realloc(s->decoded[i], sizeof(int32_t)*s->max_blocksize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(s->allocated_bitstream_size < s->max_framesize)
|
||||||
s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
|
s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user