comparison mencoder.c @ 31972:96559880e475

Improve A/V sync when not using -correct-pts. This fixes at least playing PAFF streams with the native ts demuxer. (Breaks the non-standard -demuxer lavf -nocorrect-pts.) Patch by P«”sztor Szil«”rd, bartosteka freemail hu
author cehoyos
date Tue, 07 Sep 2010 16:20:52 +0000
parents 67b33b7e3b4c
children 4a4dcc72da52
comparison
equal deleted inserted replaced
31971:910579aafc61 31972:96559880e475
462 } 462 }
463 if (sh_video->pts >= end_pts) done = 1; 463 if (sh_video->pts >= end_pts) done = 1;
464 464
465 if (vfilter) { 465 if (vfilter) {
466 int softskip = (vfilter->control(vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) == CONTROL_TRUE); 466 int softskip = (vfilter->control(vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) == CONTROL_TRUE);
467 void *decoded_frame = decode_video(sh_video, frame_data->start, frame_data->in_size, !softskip, MP_NOPTS_VALUE); 467 void *decoded_frame = decode_video(sh_video, frame_data->start, frame_data->in_size, !softskip, MP_NOPTS_VALUE, NULL);
468 if (decoded_frame) 468 if (decoded_frame)
469 filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE); 469 filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE);
470 } 470 }
471 471
472 if (print_info) mp_msg(MSGT_MENCODER, MSGL_STATUS, 472 if (print_info) mp_msg(MSGT_MENCODER, MSGL_STATUS,
1533 { 1533 {
1534 int drop_frame = skip_flag > 0 && 1534 int drop_frame = skip_flag > 0 &&
1535 (!sh_video->vfilter || 1535 (!sh_video->vfilter ||
1536 ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) != CONTROL_TRUE); 1536 ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) != CONTROL_TRUE);
1537 void *decoded_frame = decode_video(sh_video,frame_data.start,frame_data.in_size, 1537 void *decoded_frame = decode_video(sh_video,frame_data.start,frame_data.in_size,
1538 drop_frame, MP_NOPTS_VALUE); 1538 drop_frame, MP_NOPTS_VALUE, NULL);
1539 blit_frame = decoded_frame && filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE);} 1539 blit_frame = decoded_frame && filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE);}
1540 1540
1541 if (sh_video->vf_initialized < 0) mencoder_exit(1, NULL); 1541 if (sh_video->vf_initialized < 0) mencoder_exit(1, NULL);
1542 1542
1543 if(!blit_frame){ 1543 if(!blit_frame){