[vlc-devel] commit: Move es->fmt.i_extra = p_fmt->i_extra; to after the realloc. This keeps allocated sizes correctly. (Jean-Paul Saman )
git version control
git at videolan.org
Thu Nov 27 10:49:56 CET 2008
vlc | branch: 0.9-trickplay | Jean-Paul Saman <jpsaman at videolan.org> | Thu Nov 27 10:33:45 2008 +0100| [fc3ff88996c1b53ae1f151c900d78387a70f5b87] | committer: Jean-Paul Saman
Move es->fmt.i_extra = p_fmt->i_extra; to after the realloc. This keeps allocated sizes correctly.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc3ff88996c1b53ae1f151c900d78387a70f5b87
---
src/input/es_out.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/input/es_out.c b/src/input/es_out.c
index ba33a1b..1ce878e 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1832,11 +1832,11 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
if( p_fmt->i_extra )
{
uint8_t *p_tmp;
- es->fmt.i_extra = p_fmt->i_extra;
p_tmp = realloc( es->fmt.p_extra, p_fmt->i_extra );
if( !p_tmp )
return VLC_ENOMEM;
es->fmt.p_extra = p_tmp;
+ es->fmt.i_extra = p_fmt->i_extra;
memcpy( es->fmt.p_extra, p_fmt->p_extra, p_fmt->i_extra );
if( !es->p_dec ) return VLC_SUCCESS;
More information about the vlc-devel
mailing list