mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-31 20:02:42 +00:00
flacdec: Allocate buffers right after STREAMINFO is parsed.
Originally committed as revision 17794 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
03754fcd6f
commit
239b961fbf
@ -250,6 +250,7 @@ static int metadata_parse(FLACContext *s)
|
|||||||
if (!s->got_streaminfo) {
|
if (!s->got_streaminfo) {
|
||||||
ff_flac_parse_streaminfo(s->avctx, (FLACStreaminfo *)s,
|
ff_flac_parse_streaminfo(s->avctx, (FLACStreaminfo *)s,
|
||||||
s->gb.buffer+get_bits_count(&s->gb)/8);
|
s->gb.buffer+get_bits_count(&s->gb)/8);
|
||||||
|
allocate_buffers(s);
|
||||||
s->got_streaminfo = 1;
|
s->got_streaminfo = 1;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -259,8 +260,6 @@ static int metadata_parse(FLACContext *s)
|
|||||||
}
|
}
|
||||||
} while (!metadata_last);
|
} while (!metadata_last);
|
||||||
|
|
||||||
if (s->got_streaminfo)
|
|
||||||
allocate_buffers(s);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user