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

Paul Huwe reicow at yahoo.com
Sun Jul 18 11:28:19 CEST 2010


> > 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.


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stream_time_pos.patch
Type: application/octet-stream
Size: 2020 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100718/c8a044fb/attachment.obj>


More information about the MPlayer-dev-eng mailing list