Commit c88a5394 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

stream_memory: remove peek callback

This is arguably the only case where the callback made sense.
parent 9efc85f7
......@@ -37,7 +37,6 @@ struct stream_sys_t
};
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_read );
static int Control( stream_t *, int i_query, va_list );
static void Delete ( stream_t * );
......@@ -73,7 +72,6 @@ stream_t *stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
p_sys->i_preserve_memory = i_preserve_memory;
s->pf_read = Read;
s->pf_peek = Peek;
s->pf_control = Control;
s->pf_destroy = Delete;
s->p_input = NULL;
......@@ -162,11 +160,3 @@ static int Read( stream_t *s, void *p_read, unsigned int i_read )
p_sys->i_pos += i_res;
return i_res;
}
static int Peek( stream_t *s, const uint8_t **pp_peek, unsigned int i_read )
{
stream_sys_t *p_sys = s->p_sys;
int i_res = __MIN( i_read, p_sys->i_size - p_sys->i_pos );
*pp_peek = p_sys->p_buffer + p_sys->i_pos;
return i_res;
}
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