[MPlayer-dev-eng] [PATCH] -vf fixpts=use_timer

Rudolf Polzer divVerent at alientrap.org
Sun Jul 25 20:47:11 CEST 2010


On Sun, Jul 25, 2010 at 05:40:02PM +0200, Dan Oscarsson wrote:
> The attached patch just enables so reordering is always done.
> It is just my quick test code - not the way it should be done if we
> decide to always have reordering active.

> --- libmpcodecs/dec_video.c	2010-07-25 17:31:39.567420187 +0200
> +++ libmpcodecs/dec_video.c.org	2010-07-18 14:41:52.795937084 +0200
> @@ -393,7 +393,7 @@
>      unsigned int t2;
>      double tt;
>  
> -    if (1 || correct_pts && pts != MP_NOPTS_VALUE) {
> +    if (correct_pts && pts != MP_NOPTS_VALUE) {
>          if (sh_video->num_buffered_pts ==
>              sizeof(sh_video->buffered_pts) / sizeof(double))
>              mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Too many buffered pts\n");

This will _always_ buffer the pts in mencoder's case, as it passes
MP_NOPTS_VALUE which is negative-huge.  The sh_video->buffered_pts[i] < pts
test thus will never be true, and the first for loop thus will never break.

> @@ -436,7 +436,7 @@
>      else if (field_dominance == 1)
>          mpi->fields &= ~MP_IMGFIELD_TOP_FIRST;
>  
> -    if (1 || correct_pts) {
> +    if (correct_pts) {
>          int delay = get_current_video_decoder_lag(sh_video);
>          if (sh_video->num_buffered_pts) {
>              sh_video->num_buffered_pts--;

This will dequeue at most one frame.

Seriously, I have no idea WHY this works, if it works - but I'll try anyway and
learn.

Or did you also change mencoder.c to no longer pass MP_NOPTS_VALUE, but
sh_video->pts instead? In that case, I could see how the reordering might work.

Best regards,

Rudolf Polzer


More information about the MPlayer-dev-eng mailing list