[vlc-devel] [PATCH v3 1/2] demux: avformat: initialize i_tracks to zero

Zhao Zhili quinkblack at foxmail.com
Mon Jan 4 13:11:39 UTC 2021


So we can use it in CloseDemux() in error path.
---
 modules/demux/avformat/demux.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 4a765b7352..73327cbcc5 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -341,6 +341,7 @@ int avformat_OpenDemux( vlc_object_t *p_this )
     p_sys->ic = 0;
     p_sys->fmt = fmt;
     p_sys->tracks = NULL;
+    p_sys->i_tracks = 0;
     p_sys->i_ssa_order = 0;
     TAB_INIT( p_sys->i_attachments, p_sys->attachments);
     p_sys->p_title = NULL;
-- 
2.25.1



More information about the vlc-devel mailing list