aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/riff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-02-21 15:32:56 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-02-21 15:32:56 +0000
commit31f2616db86fb50174bc053f26c14db7c03e3685 (patch)
tree1180636eeb907844f448218c42799300be27e09d /libavformat/riff.c
parent431ac290461df62b0e982e88163377080e5bf290 (diff)
downloadffmpeg-31f2616db86fb50174bc053f26c14db7c03e3685.tar.gz
Fix raw rgb/bgr vertical flip in avi based on info from http://www.fourcc.org/fccbihgt.php.
partially fixes issue862. Originally committed as revision 17475 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/riff.c')
-rw-r--r--libavformat/riff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c
index e1745a2647..594eb63202 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -368,7 +368,8 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *ta
{
put_le32(pb, 40 + enc->extradata_size); /* size */
put_le32(pb, enc->width);
- put_le32(pb, enc->height);
+ //We always store RGB TopDown
+ put_le32(pb, enc->codec_tag ? enc->height : -enc->height);
put_le16(pb, 1); /* planes */
put_le16(pb, enc->bits_per_coded_sample ? enc->bits_per_coded_sample : 24); /* depth */