[vlc-commits] access: pf_control is mandatory
Rémi Denis-Courmont
git at videolan.org
Tue Jun 2 22:07:21 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun 2 23:01:38 2015 +0300| [ca00082db979238d6dbfc1f97d77e6751df764de] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca00082db979238d6dbfc1f97d77e6751df764de
---
include/vlc_access.h | 3 +--
src/input/access.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/vlc_access.h b/include/vlc_access.h
index a6a84cf..1adf669 100644
--- a/include/vlc_access.h
+++ b/include/vlc_access.h
@@ -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, ... )
diff --git a/src/input/access.c b/src/input/access.c
index 7bf4390..6b9ae13 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -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;
More information about the vlc-commits
mailing list