[vlc-devel] Video quality patches for vlc (based on 0.9.8a)

David Flynn davidf+nntp at woaf.net
Fri Apr 10 15:17:44 CEST 2009


On 2009-04-09, Bryan Moore <bmoore at airgain.com> wrote:
> See three "FIX" items below

Next time, please supply a diff -- it makes it much easier to see what
is going on.

> FIX #2: correct I-frame timing

I've taken the liberty of making this change into a diff:
> diff --git a/include/vlc_block.h b/include/vlc_block.h
> index 7b1d6d0..fdd07e9 100644
> --- a/include/vlc_block.h
> +++ b/include/vlc_block.h
> @@ -217,6 +217,7 @@ static size_t block_ChainExtract( block_t *p_list, void *p_data, size_t i_max )
>  {
>      size_t  i_total = 0;
>      uint8_t *p = (uint8_t*)p_data;
> +    block_t *p_list0 = p_list;
>  
>      while( p_list && i_max )
>      {
> @@ -226,6 +227,12 @@ static size_t block_ChainExtract( block_t *p_list, void *p_data, size_t i_max )
>          i_total += i_copy;
>          p       += i_copy;
>  
> +        if(!p_list0->i_dts && !p_list0->i_pts)
> +        {
> +            p_list0->i_dts = p_list->i_dts;
> +            p_list0->i_pts = p_list->i_pts;
> +        }
> +
>          p_list = p_list->p_next;
>      }
>      return i_total;

This looks bad.  You are searching through a chain of blocks, and pulling
a time stamp from the future in to the past.

Infact this change affects block_ChainGather, which has multiple users.

If there is a problem, with timestamps, fix it in the packetizer, thats
the only thing that knows how they should relate to the payload.

NAK.

..david




More information about the vlc-devel mailing list