[vlc-devel] commit: libvlc_stats: use VLC_OBJECT to remove a bunch of warnings ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed May 7 19:57:22 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed May  7 20:58:25 2008 +0300| [6dad9cd75cdcc66c4553bd970892c1e29598d561]

libvlc_stats: use VLC_OBJECT to remove a bunch of warnings

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6dad9cd75cdcc66c4553bd970892c1e29598d561
---

 src/input/stream.c |    2 +-
 src/libvlc.h       |    5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index 2493c96..228fb87 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -1752,7 +1752,7 @@ static block_t *AReadBlock( stream_t *s, bool *pb_eof )
     {
         p_block = p_access->pf_block( p_access );
         if( pb_eof ) *pb_eof = p_access->info.b_eof;
-        if( p_input && p_block && libvlc_stats (VLC_OBJECT(p_access)) )
+        if( p_input && p_block && libvlc_stats (p_access) )
         {
             vlc_mutex_lock( &p_input->p->counters.counters_lock );
             stats_UpdateInteger( s, p_input->p->counters.p_read_bytes,
diff --git a/src/libvlc.h b/src/libvlc.h
index c6c2917..ec8d7c8 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -242,10 +242,7 @@ static inline libvlc_priv_t *libvlc_priv (libvlc_int_t *libvlc)
     return (libvlc_priv_t *)(libvlc + 1);
 }
 
-static inline bool libvlc_stats (vlc_object_t *obj)
-{
-   return libvlc_priv (obj->p_libvlc)->b_stats;
-}
+#define libvlc_stats( o ) (libvlc_priv((VLC_OBJECT(o))->p_libvlc)->b_stats)
 
 /**
  * LibVLC "main module" configuration settings array.




More information about the vlc-devel mailing list