Author: miguel
Date: 2007-06-01 13:02:00 -0400 (Fri, 01 Jun 2007)
New Revision: 78436
Modified:
trunk/moon/src/ffvideo.cpp
Log:
Compute the micro_to_pts correctly
Modified: trunk/moon/src/ffvideo.cpp
===================================================================
--- trunk/moon/src/ffvideo.cpp 2007-06-01 17:00:02 UTC (rev 78435)
+++ trunk/moon/src/ffvideo.cpp 2007-06-01 17:02:00 UTC (rev 78436)
@@ -161,7 +161,7 @@
// Track where we are at now
video->initial_pts = video->video_stream->start_time;
- video->micro_to_pts = 0.001;
+ video->micro_to_pts = av_q2d (video->video_stream->codec->time_base);
restart_timer (video);
@@ -385,7 +385,7 @@
//video->frame_size = (int) (1000 * av_q2d
(video->video_stream->time_base) * av_q2d (video->video_stream->r_frame_rate));
// microseconds it takes to advance to the next frame
- video->frame_size = 1000 / av_q2d (video->video_stream->r_frame_rate);
+ video->frame_size = (int) (1000 / av_q2d
(video->video_stream->r_frame_rate));
video->play_start_time = av_gettime ();
printf ("Adding timer for %d\n", video->frame_size);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches