[MPlayer-dev-eng] [PATCH] Get Demuxer Time for Proper DVD Time REDUX^2

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jul 25 10:10:01 CEST 2010


On Sun, Jul 25, 2010 at 10:02:37AM +0200, Reimar Döffinger wrote:
> On Sun, Jul 18, 2010 at 02:28:19AM -0700, Paul Huwe wrote:
> > > > Please let me know if this is acceptable. 
> > > 
> > > Really close :-)
> > > 
> > > > +    if (!(mpctx->sh_video))
> > > > +        return
> > > M_PROPERTY_UNAVAILABLE;
> > > 
> > > Besides the inner () being pointless, this can work just
> > > fine
> > > for e.g. audio-only streams.
> > > 
> > > > +    switch(action) {
> > > > +    case M_PROPERTY_GET:
> > > > +       return
> > > m_property_double_ro(prop,action,arg,mpctx->demuxer->stream_pts);
> > > 
> > > Whereas it is quite ugly to print it when the value is
> > > MP_NOPTS_VALUE.
> > > I would suggest to change the check to
> > > 
> > > if (!mpctx->demuxer || mpctx->demuxer->stream_pts
> > > == MP_NOPTS_VALUE)
> > >     return M_PROPERTY_UNAVAILABLE;
> > 
> > 
> > Here is the patch with your recommended changes. I've tested it and it works great.
> 
> The documentation change say "stream_time", the actual code "stream_time_pos".
> Which one is it supposed to be?
> I suspect the _pos might be a bit confusing, but it is more consistent with the
> existing time_pos.
> I guess I'll apply in a moment with the slave.txt entry changed to stream_time_pos

Hmm.. Besides some cosmetics (tabs where only spaces should be used), the
behaviour is inconsistent with time_pos.
I'd like to suggest attached variant.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stream_time_pos.diff
Type: text/x-diff
Size: 1906 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100725/639c0e7f/attachment.diff>


More information about the MPlayer-dev-eng mailing list