summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-01-28 14:41:01 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-01-29 15:26:33 +0000
commit302ca6b20ed01ac584f5b15d5bca3d3a92b7a77a (patch)
tree35310f4d49c35847305cd6ce87c9ff178b5e8179 /libavcodec/mpegvideo_enc.c
parent1a07df31128da3a0020b66502399989b91770d44 (diff)
mpegvideo_enc: initialize the encoding context
This prevents several uninitialized variable uses that take place towards the end of encoding. CC: libav-stable@libav.org Bug-Id: CID 700760
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index be6fb08260..9e155b0c42 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2538,7 +2538,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
int mb_x, mb_y, pdif = 0;
int chr_h= 16>>s->chroma_y_shift;
int i, j;
- MpegEncContext best_s, backup_s;
+ MpegEncContext best_s = { 0 }, backup_s;
uint8_t bit_buf[2][MAX_MB_BYTES];
uint8_t bit_buf2[2][MAX_MB_BYTES];
uint8_t bit_buf_tex[2][MAX_MB_BYTES];