[vlc-commits] vod: reduce complexity and please static analyzers
Rémi Duraffort
git at videolan.org
Thu Jan 2 09:27:52 CET 2014
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Jan 1 18:53:35 2014 +0100| [83c6f126eb638ed6a570dcc6dc5884ffab5ebb03] | committer: Rémi Duraffort
vod: reduce complexity and please static analyzers
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=83c6f126eb638ed6a570dcc6dc5884ffab5ebb03
---
modules/stream_out/vod.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules/stream_out/vod.c b/modules/stream_out/vod.c
index 2f66538..6940055 100644
--- a/modules/stream_out/vod.c
+++ b/modules/stream_out/vod.c
@@ -314,15 +314,13 @@ static void MediaDel( vod_t *p_vod, vod_media_t *p_media )
RtspUnsetup(p_media->rtsp);
}
- while( p_media->i_es )
+ for( int i = 0; i < p_media->i_es; i++ )
{
- media_es_t *p_es = p_media->es[0];
- TAB_REMOVE( p_media->i_es, p_media->es, p_es );
- free( p_es->rtp_fmt.fmtp );
- free( p_es );
+ free( p_media->es[i]->rtp_fmt.fmtp );
+ free( p_media->es[i] );
}
+ free( p_media->es );
- TAB_CLEAN( p_media->i_es, p_media->es );
free( p_media );
}
More information about the vlc-commits
mailing list