Skip to content
  • Ali Sabil's avatar
    Convert unref/copy functions of GstMiniObject subclasses to static inline functions · 136cfb3b
    Ali Sabil authored
    unref and copy functions are sometimes used as function
    pointers for example in the case of g_hash_table_new_full
    as a GDestroyNotify function.
    
    Currently GstBuffer, GstEvent, GstMessage and GstQuery
    define their respective unref and copy functions as
    macros, making use of gst_mini_object_unref/copy.
    This approach works very well for most cases, except
    for some automatically generated bindings (currently Vala),
    where the memory management semantics are defined
    declaratively.
    
    The possible solutions would be to either convert all
    the macros into static inline function, or change the
    signature of gst_mini_object_unref to take a void*
    instead of a GstMiniObject*.
    
    Fixes bug #572480.
    136cfb3b