summaryrefslogtreecommitdiff
path: root/libavcodec/flacdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-03-04 00:21:46 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-03-04 00:21:46 +0000
commit239b961fbf7e01c58e4bf7df8271d1cbff0417d4 (patch)
treee710887a191639f9b82acba452f964e9f3506780 /libavcodec/flacdec.c
parent03754fcd6f481b2de0567a0ea8bc35f6fca72493 (diff)
flacdec: Allocate buffers right after STREAMINFO is parsed.
Originally committed as revision 17794 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r--libavcodec/flacdec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 07878330a2..02f1b36a5c 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -250,6 +250,7 @@ static int metadata_parse(FLACContext *s)
if (!s->got_streaminfo) {
ff_flac_parse_streaminfo(s->avctx, (FLACStreaminfo *)s,
s->gb.buffer+get_bits_count(&s->gb)/8);
+ allocate_buffers(s);
s->got_streaminfo = 1;
}
default:
@@ -259,8 +260,6 @@ static int metadata_parse(FLACContext *s)
}
} while (!metadata_last);
- if (s->got_streaminfo)
- allocate_buffers(s);
return 1;
}
return 0;