[MPlayer-cvslog] r25951 - in trunk: cfg-mplayer.h libmpdemux/demux_lavf.c libmpdemux/demux_mkv.c libmpdemux/demux_real.c libmpdemux/demuxer.c libmpdemux/demuxer.h

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Feb 4 09:45:21 CET 2008


On Sun, Feb 03, 2008 at 10:45:56PM +0200, Uoti Urpala wrote:
> On Sun, 2008-02-03 at 13:14 +0100, reimar wrote:
> > -            priv->audio_timestamp[priv->sub_packet_cnt] = (priv->a_pts==timestamp) ? (correct_pts ? MP_NOPTS_VALUE : 0) : (timestamp/1000.0);
> > +            priv->audio_timestamp[priv->sub_packet_cnt] = (priv->a_pts==timestamp) ? (user_correct_pts > 0 ? MP_NOPTS_VALUE : 0) : (timestamp/1000.0);
> 
> I don't like this and the similar changes in other demuxers. It assumes
> that the logic setting the real correct_pts works in a particular way
> based on user_correct_pts and will break if that changes (and it could
> well change).

I agree, I just did not yet think of something better.

> Was there any need for this particular change? Can this code somehow be
> executed before correct_pts has its final value?

Yes, demux_open calls ds_fill_buffer.

> This dependency on the value of correct_pts could be removed completely
> if we assume no demuxer uses a hardcoded pts value of 0 in the meaning
> of "no known timestamp". I'm not aware of any such uses remaining, but
> haven't checked the rarer demuxers.

Probably this is the best way to go, though it does not help with the
two other cases.



More information about the MPlayer-cvslog mailing list