Commit 6df797fb authored by jbr's avatar jbr

flacdec: get total number of samples from STREAMINFO

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16768 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 843cf440
......@@ -53,6 +53,7 @@ enum {
int samplerate; /**< sample rate */\
int channels; /**< number of channels */\
int bps; /**< bits-per-sample */\
int64_t samples; /**< total number of samples */\
typedef struct FLACStreaminfo {
FLACSTREAMINFO
......
......@@ -169,7 +169,8 @@ void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
avctx->channels = s->channels;
avctx->sample_rate = s->samplerate;
skip_bits(&gb, 36); /* total num of samples */
s->samples = get_bits_long(&gb, 32) << 4;
s->samples |= get_bits_long(&gb, 4);
skip_bits(&gb, 64); /* md5 sum */
skip_bits(&gb, 64); /* md5 sum */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment