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

access: pf_control is mandatory

As per both usage and documentation ACCESS_CAN_SEEK,
ACCESS_CAN_FASTSEEK, ACCESS_CAN_PAUSE, ACCESS_CAN_CONTROL_PACE and
ACCESS_GET_PTS_DELAY are mandatory. Thus the pf_control callback is
mandatory.

(Note that STREAM_* maps directly to ACCESS_* here.
parent ce3bb7a1
......@@ -128,8 +128,7 @@ struct access_t
static inline int access_vaControl( access_t *p_access, int i_query, va_list args )
{
if( !p_access ) return VLC_EGENERIC;
return p_access->pf_control ? p_access->pf_control( p_access, i_query, args )
: VLC_EGENERIC;
return p_access->pf_control( p_access, i_query, args );
}
static inline int access_Control( access_t *p_access, int i_query, ... )
......
......@@ -91,8 +91,7 @@ access_t *access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
if( p_access->p_module == NULL )
goto error;
/* if access has pf_readdir, pf_control is not mandatory */
assert( p_access->pf_control || p_access->pf_readdir );
assert( p_access->pf_control != NULL );
return p_access;
......
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