[vlc-devel] [PATCH 3/3] demux/dirac: New [raw] Dirac demuxer.

David Flynn davidf+nntp at woaf.net
Thu Apr 2 13:25:21 CEST 2009


On 2009-03-27, davidf+nntp at woaf.net <davidf+nntp at woaf.net> wrote:
> From: David Flynn <davidf at rd.bbc.co.uk>
>
> Reads raw dirac streams, feeds into packetizer.
...
> +static int Open( vlc_object_t * p_this )
> +    p_demux->p_sys     = p_sys = malloc( sizeof( demux_sys_t ) );

unchecked malloc

> +static int Demux( demux_t *p_demux)
...
> +            if( p_sys->p_es == NULL )
> +            {
> +                p_sys->p_packetizer->fmt_out.b_packetized = true;

I seem to remember a comment a while ago about this possibly being
wrong? (b_packetized)

> +                p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
> +            }

> +/*****************************************************************************
> + * Control:
> + *****************************************************************************/
> +static int Control( demux_t *p_demux, int i_query, va_list args )
> +{
> +    demux_sys_t *p_sys  = p_demux->p_sys;
> +    if( DEMUX_SET_TIME == i_query )
> +    {
> +        int64_t i64 = (int64_t)va_arg( args, int64_t );
> +        p_sys->i_offset = i64;
> +        return VLC_SUCCESS;
> +    }

I'm unsure that this is correct (DEMUX_SET_TIME) -- it is used for
the slave inputs, what is the intention behind it?  Since all this
does is lie.

The only time the dirac demux supports a slave input is if it
starts from the start of the file -- ie, not possible to seek.

..david




More information about the vlc-devel mailing list