diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-18 14:39:59 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-18 14:39:59 +0100 |
commit | ef9ae0e748ed8f267fdb4a81ab8f5a25c814ac0f (patch) | |
tree | 7b976e83e4548a42af51fb3a201f675f1a4246a8 | |
parent | 362028cac913e232ce8c3702fa4c96b33fc5e0de (diff) | |
parent | c34df422628e6b7b657faee241fe7bb2629e0f57 (diff) | |
download | ffmpeg-ef9ae0e748ed8f267fdb4a81ab8f5a25c814ac0f.tar.gz |
Merge commit 'c34df422628e6b7b657faee241fe7bb2629e0f57'
* commit 'c34df422628e6b7b657faee241fe7bb2629e0f57':
sgienc: Make sure to initialize skipped header portions
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r-- | libavcodec/sgienc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c index 9352737f42..13756f1608 100644 --- a/libavcodec/sgienc.c +++ b/libavcodec/sgienc.c @@ -96,7 +96,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame * const p = frame; PutByteContext pbc; uint8_t *in_buf, *encode_buf; - int x, y, z, length, tablesize, ret; + int x, y, z, length, tablesize, ret, i; unsigned int width, height, depth, dimension; unsigned int bytes_per_channel, pixmax, put_be; @@ -187,13 +187,15 @@ FF_ENABLE_DEPRECATION_WARNINGS bytestream2_put_be32(&pbc, 0L); /* dummy */ /* name */ - bytestream2_skip_p(&pbc, 80); + for (i = 0; i < 80; i++) + bytestream2_put_byte(&pbc, 0L); /* colormap */ bytestream2_put_be32(&pbc, 0L); /* The rest of the 512 byte header is unused. */ - bytestream2_skip_p(&pbc, 404); + for (i = 0; i < 404; i++) + bytestream2_put_byte(&pbc, 0L); if (s->rle) { PutByteContext taboff_pcb, tablen_pcb; |