comparison flac.c @ 6730:362abbd862f1 libavcodec

move call to init_get_bits inside conditional
author jbr
date Fri, 02 May 2008 21:35:32 +0000
parents 071888974d8a
children da3fecf31fa9
comparison
equal deleted inserted replaced
6729:071888974d8a 6730:362abbd862f1
102 FLACContext *s = avctx->priv_data; 102 FLACContext *s = avctx->priv_data;
103 s->avctx = avctx; 103 s->avctx = avctx;
104 104
105 if (avctx->extradata_size > 4) { 105 if (avctx->extradata_size > 4) {
106 /* initialize based on the demuxer-supplied streamdata header */ 106 /* initialize based on the demuxer-supplied streamdata header */
107 init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size*8);
108 if (avctx->extradata_size == FLAC_STREAMINFO_SIZE) { 107 if (avctx->extradata_size == FLAC_STREAMINFO_SIZE) {
109 ff_flac_parse_streaminfo(avctx, (FLACStreaminfo *)s, avctx->extradata); 108 ff_flac_parse_streaminfo(avctx, (FLACStreaminfo *)s, avctx->extradata);
110 allocate_buffers(s); 109 allocate_buffers(s);
111 } else { 110 } else {
111 init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size*8);
112 metadata_parse(s); 112 metadata_parse(s);
113 } 113 }
114 } 114 }
115 115
116 return 0; 116 return 0;