filmstripenc: fix rounding that caused fate failure
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 4 Nov 2012 23:21:04 +0000 (00:21 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 4 Nov 2012 23:28:21 +0000 (00:28 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/filmstripenc.c

index 99fbf0b..85d49be 100644 (file)
@@ -64,7 +64,7 @@ static int write_trailer(AVFormatContext *s)
     avio_wb16(pb, st->codec->width);
     avio_wb16(pb, st->codec->height);
     avio_wb16(pb, 0);  // leading
-    avio_wb16(pb, 1/av_q2d(st->codec->time_base));
+    avio_wb16(pb, st->codec->time_base.den / st->codec->time_base.num);
     for (i = 0; i < 16; i++)
         avio_w8(pb, 0x00);  // reserved