]> git.sesse.net Git - vlc/blobdiff - include/vlc_demux.h
Force -lz on fretype.
[vlc] / include / vlc_demux.h
index 31ab55580669fe043458a597f700132dfecc2007..e2858e8e2b6a5cd97d111af1637b0e0f18a4c1b7 100644 (file)
@@ -124,13 +124,15 @@ enum demux_query_e
     /* Attachments */
     DEMUX_GET_ATTACHMENTS,      /* arg1=input_attachment_t***, int* res=can fail */
 
-    /* RECORD you should accept it only if the stream can be recorded without
+    /* RECORD you are ensured that it is never called twice with the same state
+     * you should accept it only if the stream can be recorded without
      * any modification or header addition. */
     DEMUX_CAN_RECORD,           /* arg1=bool*   res=can fail(assume false) */
     DEMUX_SET_RECORD_STATE,     /* arg1=bool    res=can fail */
 
 
     /* II. Specific access_demux queries */
+    /* PAUSE you are ensured that it is never called twice with the same state */
     DEMUX_CAN_PAUSE = 0x1000,   /* arg1= bool*    can fail (assume false)*/
     DEMUX_SET_PAUSE_STATE,      /* arg1= bool     can fail */
 
@@ -192,9 +194,9 @@ VLC_EXPORT( void, demux_PacketizerDestroy, ( decoder_t *p_packetizer ) );
 #define DEMUX_INIT_COMMON() do {            \
     p_demux->pf_control = Control;          \
     p_demux->pf_demux = Demux;              \
-    p_demux->p_sys = malloc( sizeof( demux_sys_t ) ); \
+    p_demux->p_sys = calloc( 1, sizeof( demux_sys_t ) ); \
     if( !p_demux->p_sys ) return VLC_ENOMEM;\
-    memset( p_demux->p_sys, 0, sizeof( demux_sys_t ) ); } while(0)
+    } while(0)
 
 /**
  * @}