[MPlayer-dev-eng] fix for astronomic frame durations?

Makc makc.the.great at gmail.com
Mon Jul 2 16:30:30 CEST 2007


Hello people.

As you might (or might not) know, with very slow frame rates mplayer
becomes unresponsive to user input (aka "hangs"). I posted message on
user list about this
(http://lists.mplayerhq.hu/pipermail/mplayer-users/2007-June/067957.html)
before reading through log to find the problem cause, here's the
relevant bit:

> Invalid frame duration value (14330.822/0.000 => -14330.822). Defaulting to 14330.822 sec.

Now, back to what made me to come with this here. Out of interest, I
have searched this message in the sources, and here's what I've found
(http://svn.mplayerhq.hu/mplayer/trunk/libmpdemux/video.c?view=markup):

        if(d>=0){
          ...
        } else {
          mp_msg(MSGT_CPLAYER,MSGL_WARN,"\nInvalid frame duration
value (%5.3f/%5.3f => %5.3f). Defaulting to %5.3f
sec.\n",d_video->pts,next_pts,d,frame_time);
          // frame_time = 1/25.0;
        }
      }

Why frame_time = 1/25 is commented out? Is it because somebody felt
there is no reason to assume 1/25 is better than apparently invalid
value stored in frame_time? Well then I think above issue is such a
reason. And if it was commented for any other reason... at the very
least, you might want to put there some check like
if (frame_time > 1/5.0) frame_time = 1/5.0; (I saw 5 is minimal rate
in AVRational ff_frame_rate_tab, mpeg12data.h)

Thank you for consideration.



More information about the MPlayer-dev-eng mailing list