1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

init picture structure to avoid uninitialized fields

Originally committed as revision 2612 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Fabrice Bellard 2003-12-15 10:46:34 +00:00
parent 2393e65431
commit 8bb27bdfd4

View File

@ -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;