]> git.sesse.net Git - vlc/commitdiff
str_format_meta: fix reference counting
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 2 Jan 2014 21:35:02 +0000 (23:35 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 2 Jan 2014 21:35:02 +0000 (23:35 +0200)
src/text/strings.c

index 7d7a83a3ede780bb7d3c86c81a87adda56a3c409..55738a7f64eb33c0d29afbfecce767a7e1839c81 100644 (file)
@@ -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