comparison flacdec.c @ 8661:94f7aca055d5 libavcodec

flacdec: get total number of samples from STREAMINFO
author jbr
date Sun, 25 Jan 2009 02:27:02 +0000
parents 4f1525c698e9
children bb7f9053df83
comparison
equal deleted inserted replaced
8660:4f1525c698e9 8661:94f7aca055d5
167 s->bps = get_bits(&gb, 5) + 1; 167 s->bps = get_bits(&gb, 5) + 1;
168 168
169 avctx->channels = s->channels; 169 avctx->channels = s->channels;
170 avctx->sample_rate = s->samplerate; 170 avctx->sample_rate = s->samplerate;
171 171
172 skip_bits(&gb, 36); /* total num of samples */ 172 s->samples = get_bits_long(&gb, 32) << 4;
173 s->samples |= get_bits_long(&gb, 4);
173 174
174 skip_bits(&gb, 64); /* md5 sum */ 175 skip_bits(&gb, 64); /* md5 sum */
175 skip_bits(&gb, 64); /* md5 sum */ 176 skip_bits(&gb, 64); /* md5 sum */
176 177
177 dump_headers(avctx, s); 178 dump_headers(avctx, s);