[vlc-commits] Add missing va_end (cid #1049745)
Rémi Duraffort
git at videolan.org
Tue Jul 23 10:19:41 CEST 2013
vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jul 22 19:44:18 2013 +0200| [72a8f9ac1423ade35e348ea44904299862ec4b38] | committer: Jean-Baptiste Kempf
Add missing va_end (cid #1049745)
(cherry picked from commit 622ac6fcef79fd589f715ea11886a548a0447a5d)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=72a8f9ac1423ade35e348ea44904299862ec4b38
---
modules/demux/mpeg/es.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index 98e9df2..32bfe48 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -339,11 +339,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_HAS_UNSUPPORTED_META:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = true;
+ va_end( args_save );
return VLC_SUCCESS;
case DEMUX_GET_TIME:
pi64 = (int64_t*)va_arg( args, int64_t * );
*pi64 = p_sys->i_pts + p_sys->i_time_offset;
+ va_end( args_save );
return VLC_SUCCESS;
case DEMUX_GET_LENGTH:
@@ -360,10 +362,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
* don't bother trying ... Too bad */
if( f_pos < 0.01 ||
(p_sys->i_pts + p_sys->i_time_offset) < 8000000 )
+ {
+ va_end( args_save );
return VLC_EGENERIC;
+ }
pi64 = (int64_t *)va_arg( args_save, int64_t * );
*pi64 = (p_sys->i_pts + p_sys->i_time_offset) / f_pos;
+ va_end( args_save );
return VLC_SUCCESS;
}
va_end( args_save );
@@ -376,6 +382,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
i_ret = demux_vaControlHelper( p_demux->s, p_sys->i_stream_offset, -1,
p_sys->i_bitrate_avg, 1, i_query,
args );
+ va_end( args_save );
if( !i_ret && p_sys->i_bitrate_avg > 0 &&
(i_query == DEMUX_SET_POSITION || i_query == DEMUX_SET_TIME) )
{
More information about the vlc-commits
mailing list