[vlc-devel] [PATCH] Seek functionality for modules/access/imem.c

Laurent Aimar fenrir at videolan.org
Mon May 3 10:12:40 CEST 2010


Hi,

On Sun, May 02, 2010 at 10:33:07PM -0600, Daniel O'Neill wrote:
> +static int Seek(access_t *access, uint64_t i_pos)
pos

>  /**
>   * It closes an imem access
>   */
> @@ -341,7 +374,7 @@ static int ControlAccess(access_t *access, int i_query, va_list args)
>      case ACCESS_CAN_SEEK:
>      case ACCESS_CAN_FASTSEEK: {
>          bool *b = va_arg( args, bool* );
> -        *b = false;
> +        *b = (sys->source.seek != NULL);
 Useless ()

> -    unsigned flags;
> -    size_t buffer_size;
> -    void   *buffer;
> +    unsigned flags = 0;
> +    size_t   buffer_size = 0;
> +    void    *buffer = NULL;
 Useless initializations:
 - flags is unused and otherwise should be set by the get callback.
 - buffer_size and buffer are set by the get callback.

Other than that, it seems good, thanks for your work.

Regards,

-- 
fenrir




More information about the vlc-devel mailing list