[vlc-devel] [PATCH 2/2] mp4: Use the correct type to iterate over attachments

Hugo Beauzée-Luyssen hugo at beauzee.fr
Mon Nov 23 14:53:24 CET 2020


---
 modules/demux/mp4/mp4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 4ccfd88d82..136b25b42a 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -2064,7 +2064,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             *ppp_attach = calloc( p_sys->i_attachments, sizeof(**ppp_attach ) );
             if( !*ppp_attach )
                 return VLC_ENOMEM;
-            for ( size_t i = 0; i < p_sys->i_attachments; ++i )
+            for ( ssize_t i = 0; i < p_sys->i_attachments; ++i )
             {
                 (*ppp_attach)[i] = vlc_input_attachment_Hold( p_sys->pp_attachments[i] );
                 msg_Dbg( p_demux, "adding attachment %s", (*ppp_attach)[i]->psz_name );
@@ -2192,7 +2192,7 @@ static void Close ( vlc_object_t * p_this )
         MP4_TrackClean( p_demux->out, &p_sys->track[i_track] );
     free( p_sys->track );
 
-    for ( size_t i = 0; i < p_sys->i_attachments; ++i )
+    for ( ssize_t i = 0; i < p_sys->i_attachments; ++i )
         vlc_input_attachment_Release( p_sys->pp_attachments[i] );
     free( p_sys->pp_attachments );
 
-- 
2.29.2



More information about the vlc-devel mailing list