10l (deallocated memory again)
Originally committed as revision 3994 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
386b26c9fe
commit
56b31a8ee2
@ -637,10 +637,17 @@ static int flac_decode_frame(AVCodecContext *avctx,
|
|||||||
switch(metadata_type)
|
switch(metadata_type)
|
||||||
{
|
{
|
||||||
case METADATA_TYPE_STREAMINFO:{
|
case METADATA_TYPE_STREAMINFO:{
|
||||||
int bits_count= get_bits_count(&s->gb);
|
|
||||||
|
|
||||||
metadata_streaminfo(s);
|
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);
|
dump_headers(s);
|
||||||
break;}
|
break;}
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user