Commit 0e7bbdbe authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/avuienc: Initialize output data

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 47496eb9
...@@ -71,6 +71,7 @@ static int avui_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -71,6 +71,7 @@ static int avui_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return ret; return ret;
dst = pkt->data; dst = pkt->data;
if (!interlaced) { if (!interlaced) {
memset(dst, 0, avctx->width * skip);
dst += avctx->width * skip; dst += avctx->width * skip;
} }
...@@ -84,6 +85,7 @@ static int avui_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -84,6 +85,7 @@ static int avui_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
} else { } else {
src = pic->data[0] + i * pic->linesize[0]; src = pic->data[0] + i * pic->linesize[0];
} }
memset(dst, 0, avctx->width * skip + 4 * i);
dst += avctx->width * skip + 4 * i; dst += avctx->width * skip + 4 * i;
for (j = 0; j < avctx->height; j += interlaced + 1) { for (j = 0; j < avctx->height; j += interlaced + 1) {
memcpy(dst, src, avctx->width * 2); memcpy(dst, src, avctx->width * 2);
......
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