From 2fd7d64a4778030a4772bfcdb81a535e0dcd2680 Mon Sep 17 00:00:00 2001 From: mswitch Date: Sat, 9 Feb 2002 11:10:31 +0000 Subject: [PATCH] Fixed some stuff with setting timestamps, and added proper setting of playback speed. I'm guessing I'm looking at lots of sleepless nights ahead =( git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4604 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_dxr3.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c index acee893d98..fd6e9daa9d 100644 --- a/libvo/vo_dxr3.c +++ b/libvo/vo_dxr3.c @@ -296,10 +296,12 @@ static void draw_osd(void) static uint32_t draw_frame(uint8_t * src[]) { + ioctl(fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts); if (img_format == IMGFMT_MPEGPES) { vo_mpegpes_t *p = (vo_mpegpes_t *) src[0]; if (p->id == 0x20) { + ioctl(fd_spu, EM8300_IOCTL_SPU_SETPTS, &vo_pts); write(fd_spu, p->data, p->size); } else { write(fd_video, p->data, p->size); @@ -326,11 +328,14 @@ static uint32_t draw_frame(uint8_t * src[]) static void flip_page(void) { - ioctl(fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts); - ioctl(fd_spu, EM8300_IOCTL_SPU_SETPTS, &vo_pts); + if (!vo_pts) { + ioval = (90000.0 / vo_fps); + ioctl(fd_control, EM8300_IOCTL_SCR_SETSPEED, &ioval); + } #ifdef USE_LIBAVCODEC if (img_format == IMGFMT_YV12) { int out_size = avcodec_encode_video(avc_context, avc_outbuf, avc_outbuf_size, &avc_picture); + ioctl(fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts); write(fd_video, avc_outbuf, out_size); } #endif