vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sun May 3 17:06:17 2015 +0300| [00b61f825aae87c27b46e1612e661e985a189d60] | committer: Rémi Denis-Courmont
avcodec: macro expansion safety > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=00b61f825aae87c27b46e1612e661e985a189d60 --- modules/codec/avcodec/video.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c index 9be7aa5..b603457 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c @@ -82,11 +82,18 @@ struct decoder_sys_t }; #ifdef HAVE_AVCODEC_MT -# define wait_mt(s) vlc_sem_wait( &s->sem_mt ) -# define post_mt(s) vlc_sem_post( &s->sem_mt ) +static inline void wait_mt(decoder_sys_t *sys) +{ + vlc_sem_wait(&sys->sem_mt); +} + +static inline void post_mt(decoder_sys_t *sys) +{ + vlc_sem_post(&sys->sem_mt); +} #else -# define wait_mt(s) -# define post_mt(s) +# define wait_mt(s) ((void)s) +# define post_mt(s) ((void)s) #endif /***************************************************************************** _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
