Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
6a51c0a2
Commit
6a51c0a2
authored
Sep 01, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve access initialization macro safety
parent
b6c4de7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
17 deletions
+23
-17
include/vlc_access.h
include/vlc_access.h
+23
-17
No files found.
include/vlc_access.h
View file @
6a51c0a2
...
...
@@ -153,23 +153,29 @@ static inline void access_InitFields( access_t *p_a )
*/
VLC_API
input_thread_t
*
access_GetParentInput
(
access_t
*
p_access
)
VLC_USED
;
#define ACCESS_SET_CALLBACKS( read, block, control, seek ) \
p_access->pf_read = read; \
p_access->pf_block = block; \
p_access->pf_control = control; \
p_access->pf_seek = seek;
#define STANDARD_READ_ACCESS_INIT \
access_InitFields( p_access ); \
ACCESS_SET_CALLBACKS( Read, NULL, Control, Seek ); \
p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t )); \
if( !p_sys ) return VLC_ENOMEM;
#define STANDARD_BLOCK_ACCESS_INIT \
access_InitFields( p_access ); \
ACCESS_SET_CALLBACKS( NULL, Block, Control, Seek ); \
p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t ) ); \
if( !p_sys ) return VLC_ENOMEM;
#define ACCESS_SET_CALLBACKS( read, block, control, seek ) \
do { \
p_access->pf_read = (read); \
p_access->pf_block = (block); \
p_access->pf_control = (control); \
p_access->pf_seek = (seek); \
} while(0)
#define STANDARD_READ_ACCESS_INIT \
do { \
access_InitFields( p_access ); \
ACCESS_SET_CALLBACKS( Read, NULL, Control, Seek ); \
p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t ) ); \
if( !p_sys ) return VLC_ENOMEM;\
} while(0);
#define STANDARD_BLOCK_ACCESS_INIT \
do { \
access_InitFields( p_access ); \
ACCESS_SET_CALLBACKS( NULL, Block, Control, Seek ); \
p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t ) ); \
if( !p_sys ) return VLC_ENOMEM; \
} while(0);
/**
* @}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment