changeset 9118:f13d019e004a libavcodec

flacdec: Allocate buffers right after STREAMINFO is parsed.
author jbr
date Wed, 04 Mar 2009 00:21:46 +0000
parents cfe1aeeb86ed
children f3d87e34599f
files flacdec.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flacdec.c	Tue Mar 03 23:52:31 2009 +0000
+++ b/flacdec.c	Wed Mar 04 00:21:46 2009 +0000
@@ -250,6 +250,7 @@
                     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 @@
             }
         } while (!metadata_last);
 
-        if (s->got_streaminfo)
-            allocate_buffers(s);
         return 1;
     }
     return 0;