[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:02:37 CEST 2010
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
More information about the MPlayer-dev-eng
mailing list