aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/riff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-17 03:25:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-17 03:25:46 +0100
commit53b6503184a9403e9ac7eb77a35059be64a308b0 (patch)
tree7c50e56ce0262d96dd4c6e77996ba379d554ea2a /libavformat/riff.c
parent9af6abdc17deb95c9b1f1d9242ba49b8b5e0b016 (diff)
downloadffmpeg-53b6503184a9403e9ac7eb77a35059be64a308b0.tar.gz
avienc: Fix rawvideo 32bit
Bug found by: Rik Maes <rik.maes54@gmail.com> Change based on suggestion by Rik Maes Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/riff.c')
-rw-r--r--libavformat/riff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c
index ea598d272e..4f475ba04d 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -519,7 +519,7 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc, const AVCodecTag *t
avio_wl16(pb, enc->bits_per_coded_sample ? enc->bits_per_coded_sample : 24); /* depth */
/* compression type */
avio_wl32(pb, enc->codec_tag);
- avio_wl32(pb, enc->width * enc->height * 3);
+ avio_wl32(pb, (enc->width * enc->height * (enc->bits_per_coded_sample ? enc->bits_per_coded_sample : 24)+7) / 8);
avio_wl32(pb, 0);
avio_wl32(pb, 0);
avio_wl32(pb, 0);