[vlc-devel] [PATCH] real file index and seek

Jean-Baptiste Kempf jb at videolan.org
Sat May 24 00:33:18 CEST 2008


On Fri, May 23, 2008 at 08:38:26PM +0800, Wang Bo wrote :
> @@ -751,6 +952,7 @@ static int HeaderRead( demux_t *p_demux )
>      uint32_t    i_size;
>      int64_t     i_skip;
>      int         i_version;
> +    p_sys->p_meta = vlc_meta_New();
>  
>      for( ;; )
>      {
> @@ -801,6 +1003,8 @@ static int HeaderRead( demux_t *p_demux )
>              /* set the duration for export in control */
>              p_sys->i_our_duration = (int)GetDWBE(&header[20]);
>   
> +            p_sys->i_index_offset = GetDWBE(&header[28]);
> +
>              i_flags = GetWBE(&header[38]);
>              msg_Dbg( p_demux, "    - flags=0x%x %s%s%s",
>                       i_flags,
> @@ -827,6 +1031,8 @@ static int HeaderRead( demux_t *p_demux )
>                  EnsureUTF8( psz );
>                  msg_Dbg( p_demux, "    - title=`%s'", psz );
>                  p_sys->psz_title = psz;
> +                vlc_meta_Add( p_sys->p_meta, VLC_META_TITLE, psz );
> +                free( psz );
>                  i_skip -= i_len;
>              }
>              i_skip -= 2;
> @@ -841,6 +1047,8 @@ static int HeaderRead( demux_t *p_demux )
>                  EnsureUTF8( psz );
>                  msg_Dbg( p_demux, "    - author=`%s'", psz );
>                  p_sys->psz_artist = psz;
> +                vlc_meta_Add( p_sys->p_meta, VLC_META_ARTIST, psz );
> +                free( psz );
>                  i_skip -= i_len;
>              }
>              i_skip -= 2;
> @@ -855,6 +1063,8 @@ static int HeaderRead( demux_t *p_demux )
>                  EnsureUTF8( psz );
>                  msg_Dbg( p_demux, "    - copyright=`%s'", psz );
>                  p_sys->psz_copyright = psz;
> +                vlc_meta_Add( p_sys->p_meta, VLC_META_COPYRIGHT, psz );
> +                free( psz );
>                  i_skip -= i_len;
>              }
>              i_skip -= 2;
> @@ -869,6 +1079,8 @@ static int HeaderRead( demux_t *p_demux )
>                  EnsureUTF8( psz );
>                  msg_Dbg( p_demux, "    - comment=`%s'", psz );
>                  p_sys->psz_description = psz;
> +                vlc_meta_Add( p_sys->p_meta, VLC_META_DESCRIPTION, psz );
> +                free( psz );
>                  i_skip -= i_len;
>              }
>              i_skip -= 2;
Why that change ?
It is already done in :
        case DEMUX_GET_META:


Best Regards,

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



More information about the vlc-devel mailing list