Commit 5cca8446 authored by lorenm's avatar lorenm

10l (deallocated memory again)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3994 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cfeafa30
......@@ -637,10 +637,17 @@ static int flac_decode_frame(AVCodecContext *avctx,
switch(metadata_type)
{
case METADATA_TYPE_STREAMINFO:{
int bits_count= get_bits_count(&s->gb);
metadata_streaminfo(s);
/* Buffer might have been reallocated, reinit bitreader */
if(buf != &s->bitstream[s->bitstream_index])
{
int bits_count = get_bits_count(&s->gb);
buf= &s->bitstream[s->bitstream_index];
init_get_bits(&s->gb, buf, buf_size*8);
skip_bits(&s->gb, bits_count);
}
dump_headers(s);
break;}
default:
......
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