Commit d2b8c6dc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

zip: remove suspicious peek callback

(The read callback is as suspicious and retained.)
parent e21858e2
......@@ -44,11 +44,6 @@ static int Read(stream_t *s, void *data, unsigned size)
return stream_Read(s->p_sys->payload, data, size);
}
static int Peek( stream_t *s, const uint8_t **data, unsigned size)
{
return stream_Peek(s->p_sys->payload, data, size);
}
static int Control(stream_t *s, int query, va_list args)
{
switch (query) {
......@@ -145,7 +140,6 @@ int RarStreamOpen(vlc_object_t *object)
}
s->pf_read = Read;
s->pf_peek = Peek;
s->pf_control = Control;
stream_sys_t *sys = s->p_sys = malloc(sizeof(*sys));
......
......@@ -54,7 +54,6 @@ vlc_module_end()
* Local prototypes
****************************************************************************/
static int Read ( stream_t *, void *p_read, unsigned int i_read );
static int Peek ( stream_t *, const uint8_t **pp_peek, unsigned int i_peek );
static int Control( stream_t *, int i_query, va_list );
typedef struct node node;
......@@ -184,7 +183,6 @@ int StreamOpen( vlc_object_t *p_this )
return VLC_ENOMEM;
s->pf_read = Read;
s->pf_peek = Peek;
s->pf_control = Control;
p_sys->fileFunctions = ( zlib_filefunc_def * )
......@@ -266,24 +264,6 @@ static int Read( stream_t *s, void *p_read, unsigned int i_read )
return i_len;
}
/** *************************************************************************
* Peek
****************************************************************************/
static int Peek( stream_t *s, const uint8_t **pp_peek, unsigned int i_peek )
{
stream_sys_t *p_sys = s->p_sys;
/* Fill the buffer */
if( Fill( s ) )
return -1;
/* Point to the buffer */
int i_len = __MIN( i_peek, p_sys->i_len - p_sys->i_pos );
*pp_peek = (uint8_t*) p_sys->psz_xspf + p_sys->i_pos;
return i_len;
}
/** *************************************************************************
* Control
****************************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment