avimux: always write positive height in stream properties
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 29 Sep 2021 14:39:45 +0000 (16:39 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 29 Sep 2021 15:10:56 +0000 (17:10 +0200)
nihav-commonfmt/src/muxers/avi.rs

index 18d17babf7635379bcd8ceecea02cb9da8433a63..00b3e6db60e935c680d7a6d87aa90b7f0532e058 100644 (file)
@@ -171,11 +171,7 @@ impl<'a> MuxCore<'a> for AVIMuxer<'a> {
                     let hdr_pos = self.bw.tell();
                     self.bw.write_u32le(0)?;
                     self.bw.write_u32le(vinfo.width as u32)?;
-                    if vinfo.flipped {
-                        self.bw.write_u32le((-(vinfo.height as i32)) as u32)?;
-                    } else {
-                        self.bw.write_u32le(vinfo.height as u32)?;
-                    }
+                    self.bw.write_u32le(vinfo.height as u32)?;
                     self.bw.write_u16le(vinfo.format.components as u16)?;
                     self.bw.write_u16le(vinfo.format.get_total_depth() as u16)?;
                     let fcc = find_avi_fourcc(str.get_info().get_name());