[vlc-devel] [PATCH 3/3] [transcode] Fix allocation of picture_t without full initialization
davidf+nntp at woaf.net
davidf+nntp at woaf.net
Tue Nov 4 15:48:22 CET 2008
From: David Flynn <davidf at rd.bbc.co.uk>
zero picture_t when allocating. Avoids total disaster when something
forgets to set b_progresive and friends.
Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
---
modules/stream_out/transcode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/stream_out/transcode.c b/modules/stream_out/transcode.c
index c2040ff..bada3c6 100644
--- a/modules/stream_out/transcode.c
+++ b/modules/stream_out/transcode.c
@@ -2224,7 +2224,7 @@ static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring,
i = 0;
}
- p_pic = malloc( sizeof(picture_t) );
+ p_pic = calloc( 1, sizeof(picture_t) );
if( !p_pic ) return NULL;
p_dec->fmt_out.video.i_chroma = p_dec->fmt_out.i_codec;
vout_AllocatePicture( VLC_OBJECT(p_dec), p_pic,
--
1.5.6.5
More information about the vlc-devel
mailing list