]> git.sesse.net Git - vlc/commitdiff
Revert "Remove libvlc_free"
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 2 Oct 2010 15:54:53 +0000 (18:54 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 2 Oct 2010 15:54:53 +0000 (18:54 +0300)
This reverts commit 61f0547b72d3ba80039f09064249d89fa8f2b0f7.

Conflicts:

include/vlc/libvlc.h

include/vlc/libvlc.h
include/vlc/libvlc_media_player.h
src/control/core.c
src/libvlc.sym

index 8541768ff5f03c7b71e9d68eca7e4e950aec86b0..5b8c265f51c2403afc9f1d1f5869f2f8ed4e718d 100644 (file)
@@ -226,6 +226,14 @@ VLC_PUBLIC_API const char * libvlc_get_compiler(void);
  */
 VLC_PUBLIC_API const char * libvlc_get_changeset(void);
 
+/**
+ * Frees an heap allocation returned by a LibVLC function.
+ * If you know you're using the same underlying C run-time as the LibVLC
+ * implementation, then you can call ANSI C free() directly instead.
+ *
+ * \param ptr the pointer
+ */
+VLC_PUBLIC_API void libvlc_free( void *ptr );
 
 /** \defgroup libvlc_event LibVLC asynchronous events
  * LibVLC emits asynchronous events.
index e8fe7a7a970954fbf2de9ec1cf6ef6e9d6d2f57c..105090eafc13e384e06fbeee2935c4c595a5958a 100644 (file)
@@ -735,7 +735,7 @@ VLC_PUBLIC_API void libvlc_video_set_scale( libvlc_media_player_t *p_mi, float f
  *
  * \param p_mi the media player
  * \return the video aspect ratio or NULL if unspecified
- * (the result must be released with free()).
+ * (the result must be released with free() or libvlc_free()).
  */
 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *p_mi );
 
index 1411e9c0824bcb8c43b32cf679467719a5974004..745c85af64a27b39ec8986d25912684ba8a73cff 100644 (file)
@@ -159,3 +159,8 @@ const char * libvlc_get_changeset(void)
     extern const char psz_vlc_changeset[];
     return psz_vlc_changeset;
 }
+
+void libvlc_free( void *ptr )
+{
+    free( ptr );
+}
index f635a689fb32933fb634f0152c25e4dc107b03b5..363faff8dc8f3b89386db82bd3733e89592b6a6d 100644 (file)
@@ -32,6 +32,7 @@ libvlc_event_manager_register_event_type
 libvlc_event_manager_release
 libvlc_event_send
 libvlc_event_type_name
+libvlc_free
 libvlc_get_changeset
 libvlc_get_compiler
 libvlc_get_fullscreen