From 31f2616db86fb50174bc053f26c14db7c03e3685 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 21 Feb 2009 15:32:56 +0000 Subject: 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 --- libavformat/riff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavformat/riff.c') 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 */ -- cgit v1.2.3