[vlc-commits] str_format_meta: fix reference counting

Rémi Denis-Courmont git at videolan.org
Thu Jan 2 22:35:21 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan  2 23:35:02 2014 +0200| [bcb04e32aa4b800ca1536da79a3c938a232ad815] | committer: Rémi Denis-Courmont

str_format_meta: fix reference counting

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

 src/text/strings.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/text/strings.c b/src/text/strings.c
index 7d7a83a..55738a7 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -735,7 +735,10 @@ char *str_format_meta( input_thread_t *p_input, const char *s )
                     {
                         audio_output_t *aout = input_GetAout( p_input );
                         if( aout )
+                        {
                             vol = aout_VolumeGet( aout );
+                            vlc_object_release( aout );
+                        }
                     }
                     if( vol >= 0.f )
                     {
@@ -797,9 +800,6 @@ char *str_format_meta( input_thread_t *p_input, const char *s )
     }
     *(dst+d) = '\0';
 
-    if( p_input )
-        vlc_object_release( p_input );
-
     return dst;
 }
 #undef INSERT_STRING



More information about the vlc-commits mailing list