Commit 302ca6b2 authored by Vittorio Giovara's avatar Vittorio Giovara

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
parent 1a07df31
...@@ -2538,7 +2538,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ ...@@ -2538,7 +2538,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
int mb_x, mb_y, pdif = 0; int mb_x, mb_y, pdif = 0;
int chr_h= 16>>s->chroma_y_shift; int chr_h= 16>>s->chroma_y_shift;
int i, j; 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_buf[2][MAX_MB_BYTES];
uint8_t bit_buf2[2][MAX_MB_BYTES]; uint8_t bit_buf2[2][MAX_MB_BYTES];
uint8_t bit_buf_tex[2][MAX_MB_BYTES]; uint8_t bit_buf_tex[2][MAX_MB_BYTES];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment