From: Frank Galligan Date: Thu, 4 Nov 2010 03:33:00 +0000 (-0400) Subject: Fixed bug first cluster timecode of webm file is wrong. X-Git-Tag: 1.0_branch~794 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c2dfde3ed0c6e99ec20b9a4f85e2e4772a956ba;p=profile%2Fivi%2Flibvpx.git Fixed bug first cluster timecode of webm file is wrong. When the first pts equaled 0 ivfenc was incorrectly increasing the pts by 1. I changed the pts and last pts to be signed. I also set the default value of last pts to -1. Change-Id: I30bcec5af9b16d93fa9e3abbea7764b133e9cd73 --- diff --git a/vpxenc.c b/vpxenc.c index b139c68..af9839c 100644 --- a/vpxenc.c +++ b/vpxenc.c @@ -435,7 +435,7 @@ struct EbmlGlobal int debug; FILE *stream; - uint64_t last_pts_ms; + int64_t last_pts_ms; vpx_rational_t framerate; /* These pointers are to the start of an element */ @@ -648,7 +648,7 @@ write_webm_block(EbmlGlobal *glob, unsigned char track_number; unsigned short block_timecode = 0; unsigned char flags; - uint64_t pts_ms; + int64_t pts_ms; int start_cluster = 0, is_keyframe; /* Calculate the PTS of this frame in milliseconds */ @@ -1074,6 +1074,7 @@ int main(int argc, const char **argv_) int psnr_count = 0; exec_name = argv_[0]; + ebml.last_pts_ms = -1; if (argc < 3) usage_exit();