comparison libvo/vo_dxr3.c @ 4219:70888f501b4a

Fixed seeking
author mswitch
date Thu, 17 Jan 2002 19:24:33 +0000
parents 3931c41f740a
children d74d4d26b87b
comparison
equal deleted inserted replaced
4218:3931c41f740a 4219:70888f501b4a
5 * 5 *
6 */ 6 */
7 7
8 /* ChangeLog added 2002-01-10 8 /* ChangeLog added 2002-01-10
9 * 2002-01-17: 9 * 2002-01-17:
10 * Testrelease of new sync engine (using previously undocumented feature of em8300). Seeking does not work with this one! 10 * Testrelease of new sync engine (using previously undocumented feature of em8300).
11 * 11 *
12 * 2002-01-15: 12 * 2002-01-15:
13 * Preliminary subpic support with -vc mpegpes and dvd's 13 * Preliminary subpic support with -vc mpegpes and dvd's
14 * Device interfaces tries the new naming scheme by default (even though most users probably still use the old one) 14 * Device interfaces tries the new naming scheme by default (even though most users probably still use the old one)
15 * 15 *
447 } 447 }
448 448
449 static void flip_page(void) 449 static void flip_page(void)
450 { 450 {
451 static int prev_pts = 0; 451 static int prev_pts = 0;
452 /* Flush the device if a seek occured */
452 if (prev_pts > vo_pts) { 453 if (prev_pts > vo_pts) {
453 printf("WARNING: Seeking will break a/v sync currently\n"); 454 printf("\nWARNING: Seeking may or may not break a/v sync (sometimes seeking again helps)\n");
454 } 455 ioval = EM8300_SUBDEVICE_VIDEO;
456 ioctl(fd_control, EM8300_IOCTL_FLUSH, &ioval);
457 }
458 prev_pts = vo_pts;
455 #ifdef USE_MP1E 459 #ifdef USE_MP1E
456 if (img_format == IMGFMT_YV12) { 460 if (img_format == IMGFMT_YV12) {
457 mp1e_buffer.data = picture_data[0]; 461 mp1e_buffer.data = picture_data[0];
458 mp1e_buffer.time = vo_pts / 90000.0; 462 mp1e_buffer.time = vo_pts / 90000.0;
459 mp1e_buffer.user_data = NULL; 463 mp1e_buffer.user_data = NULL;
462 mp1e_buffer.data = picture_data[0]; 466 mp1e_buffer.data = picture_data[0];
463 mp1e_buffer.time = vo_pts / 90000.0; 467 mp1e_buffer.time = vo_pts / 90000.0;
464 mp1e_buffer.user_data = NULL; 468 mp1e_buffer.user_data = NULL;
465 rte_push_video_buffer(mp1e_context, &mp1e_buffer); 469 rte_push_video_buffer(mp1e_context, &mp1e_buffer);
466 } 470 }
467 prev_pts = vo_pts;
468 #endif 471 #endif
469 } 472 }
470 473
471 static uint32_t draw_slice(uint8_t *srcimg[], int stride[], int w, int h, int x0, int y0) 474 static uint32_t draw_slice(uint8_t *srcimg[], int stride[], int w, int h, int x0, int y0)
472 { 475 {