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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jul 18 10:43:55 CEST 2010


On Sat, Jul 17, 2010 at 11:24:29PM -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;


More information about the MPlayer-dev-eng mailing list