[vlc-commits] commit: OSD: use picture_Release() not free() ! ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sat Nov 13 23:10:10 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 13 23:44:18 2010 +0200| [2a9b31019ee3af7b9afff1604e97e65806ec8419] | committer: Rémi Denis-Courmont 

OSD: use picture_Release() not free() !

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

 modules/misc/osd/osd_menu.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/modules/misc/osd/osd_menu.c b/modules/misc/osd/osd_menu.c
index a26e7c1..7b6529b 100644
--- a/modules/misc/osd/osd_menu.c
+++ b/modules/misc/osd/osd_menu.c
@@ -235,10 +235,7 @@ void osd_StatesFree( osd_menu_t *p_menu, osd_state_t *p_states )
         if( p_state->p_next )
         {
             if( p_state->p_next->p_pic )
-            {
-                free( p_state->p_next->p_pic->p_data_orig );
-                free( p_state->p_next->p_pic );
-            }
+                picture_Release( p_state->p_next->p_pic );
             free( p_state->p_next->psz_state );
             free( p_state->p_next );
             p_state->p_next = NULL;
@@ -250,10 +247,7 @@ void osd_StatesFree( osd_menu_t *p_menu, osd_state_t *p_states )
         msg_Dbg( p_menu, " |- freeing state %s [%p]",
                  p_state->psz_state, p_states );
         if( p_states->p_pic )
-        {
-            free( p_states->p_pic->p_data_orig );
-            free( p_states->p_pic );
-        }
+            picture_Release( p_state->p_next->p_pic );
         free( p_state->psz_state );
         free( p_states );
     }



More information about the vlc-commits mailing list