aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/flacdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-01-25 02:27:02 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-01-25 02:27:02 +0000
commitaeb987cebf021192979ee162d82ab2577d62f72e (patch)
tree1a6b1b6dfdf5208fc700d242c8039a7692b01b91 /libavcodec/flacdec.c
parent7fa9a0a2565d2b1b9039c7e4da9092a2760579a1 (diff)
downloadffmpeg-aeb987cebf021192979ee162d82ab2577d62f72e.tar.gz
flacdec: get total number of samples from STREAMINFO
Originally committed as revision 16768 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r--libavcodec/flacdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 7ebf01595b..ee3a3f2ca5 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -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 */