From 8bb27bdfd4de42d2cf00410bd51139a2b47768e1 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Mon, 15 Dec 2003 10:46:34 +0000 Subject: [PATCH] init picture structure to avoid uninitialized fields Originally committed as revision 2612 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ffmpeg.c b/ffmpeg.c index 86ee13bfd2..7af1d50e61 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1291,6 +1291,8 @@ static int av_encode(AVFormatContext **output_files, break; case CODEC_TYPE_VIDEO: data_size = (ist->st->codec.width * ist->st->codec.height * 3) / 2; + /* XXX: allocate picture correctly */ + memset(&picture, 0, sizeof(picture)); ret = avcodec_decode_video(&ist->st->codec, &picture, &got_picture, ptr, len); ist->st->quality= picture.quality;