[vlc-devel] Updated patch for ogg/theora seeking

Jean-Baptiste Kempf jb at videolan.org
Mon Jun 7 21:42:55 CEST 2010


On Mon, Jun 07, 2010 at 08:59:08AM -0300, salsaman wrote :
> diff --git a/modules/codec/theora.c b/modules/codec/theora.c

> +    /* need to skip some pages after a seek */
> +    if ( p_block->i_flags & BLOCK_FLAG_PREROLL )
> +        {
> +            p_sys->b_skip_frame = true;
> +    }
> +    else p_sys->b_skip_frame = false;
Wouldn't something like this, be better?
p_sys->b_skip_frame = ( p_block->i_flags & BLOCK_FLAG_PREROLL );


> +		/* update start of data pointer...
> +		 *   I think this is correct...*/
> +		p_sys->i_data_start = stream_Tell( p_demux->s );
Can anyone  comment on the correctness?

> +    long l_seek_frame;
Why long here?

> +		    l_seek_frame = i64 * p_stream->f_rate;
?


> +		    if ( p_stream->fmt.i_codec == VLC_CODEC_THEORA )
> +		    {
> +			f_rate = p_stream->f_rate;
> +		    }
Does it apply to THEORA only or all video codecs? (dirac?vp8?)

> +	      for( i = 0; i < p_sys->i_streams; i++ )
Side note: you can define loop counter inside for( in VLC code.

> +  int i_page_size;
Is int the best here?

> +struct _oggseek_index_entry
I doubt this is legal: starting with _ . Aren't _* reserved?

Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/



More information about the vlc-devel mailing list