Commit b0f8376b authored by michael's avatar michael

Only realloc() bitstream buffer when the needed size increased,

this is needed to prevent loosing bitstream data with large metadata.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14279 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e0ee6bd5
......@@ -139,7 +139,8 @@ static void allocate_buffers(FLACContext *s){
s->decoded[i] = av_realloc(s->decoded[i], sizeof(int32_t)*s->max_blocksize);
}
s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
if(s->allocated_bitstream_size < s->max_framesize)
s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
}
void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
......
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