[MPlayer-cvslog] r33448 - trunk/gui/mplayer/gui_common.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue May 10 18:38:13 CEST 2011

On Tue, May 10, 2011 at 12:59:18PM +0200, Ingo Brückl wrote:
> Reimar Döffinger wrote on Mon, 9 May 2011 20:33:28 +0200:
> > On 9 May 2011, at 13:17, ib <subversion at mplayerhq.hu> wrote:
> >> Author: ib
> >> Date: Mon May  9 13:17:43 2011
> >> New Revision: 33448
> >>
> >> Log:
> >> Check for reasonable time values.
> >>
> >> Some A/V files don't provide reasonable time information in which case
> >> the GUI produces a junk dlabel, so set values to zero.
> > A sample would be a good idea. Also using FFMAX should simplify the code.
> What exactly do you mean by sample? I have a captured 500 MB wmv live stream,
> returning a time length of 1844674407365.95508.

Yes, but why is that so? This seems likely to be a demuxer bug and it would
be a good idea to fix that bug and not _only_ "sweep it under the rug".

> Rather than r33448, I'd like to fix it with the attached patch (revising my
> suggested [PATCH] Check for reasonable time length), because this patch would
> solve OSD problems as well as GUI problems, and I could revert r33448.

I don't particularly like limiting a double value to a int-based one,
but it might be the best solution.
Though considering the use-cases INT_MAX would be better than INT32_MAX

More information about the MPlayer-cvslog mailing list