]> git.sesse.net Git - vlc/commitdiff
bluray: free resource as soon as not needed
authorRafaël Carré <funman@videolan.org>
Mon, 12 Aug 2013 07:41:10 +0000 (09:41 +0200)
committerRafaël Carré <funman@videolan.org>
Fri, 16 Aug 2013 10:43:13 +0000 (12:43 +0200)
modules/access/bluray.c

index f1e0305a21cb5b727e36157754d4c919ba2d745d..fe641bb406f555087933de98d57732115640986a 100644 (file)
@@ -1303,12 +1303,12 @@ static void blurayHandleEvent( demux_t *p_demux, const BD_EVENT *e )
             break ;
         /* The param we get is the real stream id, not an index, ie. it starts from 1 */
         int pid = info->clips[p_sys->i_current_clip].audio_streams[e->param - 1].pid;
+        bd_free_title_info( info );
         int idx = findEsPairIndex(p_sys, pid);
         if (idx >= 0) {
             es_out_id_t *p_es = vlc_array_item_at_index(&p_sys->es, idx);
             es_out_Control( p_demux->out, ES_OUT_SET_ES, p_es );
         }
-        bd_free_title_info( info );
         p_sys->i_audio_stream = pid;
         break ;
     case BD_EVENT_CHAPTER: