Add missing typecast and re-enable timestamp test
authorDebargha Mukherjee <debargha@google.com>
Fri, 6 Dec 2019 03:14:41 +0000 (19:14 -0800)
committerDebargha Mukherjee <debargha@google.com>
Fri, 6 Dec 2019 03:15:53 +0000 (19:15 -0800)
BUG=webm:701

Change-Id: I1d8a6e263fddb9e4cc6265a313011a18d18bbf9e

test/timestamp_test.cc
vp8/vp8_cx_iface.c

index ba1cbce..021ea62 100644 (file)
@@ -100,6 +100,8 @@ TEST_P(TimestampTestVp9Only, TestVpxRollover) {
 
 VP8_INSTANTIATE_TEST_CASE(TimestampTest,
                           ::testing::Values(::libvpx_test::kTwoPassGood));
+VP8_INSTANTIATE_TEST_CASE(TimestampTestVp9Only,
+                          ::testing::Values(::libvpx_test::kTwoPassGood));
 VP9_INSTANTIATE_TEST_CASE(TimestampTest,
                           ::testing::Values(::libvpx_test::kTwoPassGood));
 VP9_INSTANTIATE_TEST_CASE(TimestampTestVp9Only,
index eb04f67..07ea52c 100644 (file)
@@ -912,8 +912,8 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx,
 
     dst_time_stamp =
         pts_val * ctx->timestamp_ratio.num / ctx->timestamp_ratio.den;
-    dst_end_time_stamp = (pts_val + duration) * ctx->timestamp_ratio.num /
-                         ctx->timestamp_ratio.den;
+    dst_end_time_stamp = (pts_val + (int64_t)duration) *
+                         ctx->timestamp_ratio.num / ctx->timestamp_ratio.den;
 
     if (img != NULL) {
       res = image2yuvconfig(img, &sd);