1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

Merge commit 'c34df422628e6b7b657faee241fe7bb2629e0f57'

* commit 'c34df422628e6b7b657faee241fe7bb2629e0f57':
  sgienc: Make sure to initialize skipped header portions

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
Hendrik Leppkes
2015-12-18 14:39:59 +01:00

View File

@@ -96,7 +96,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame * const p = frame; const AVFrame * const p = frame;
PutByteContext pbc; PutByteContext pbc;
uint8_t *in_buf, *encode_buf; 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 width, height, depth, dimension;
unsigned int bytes_per_channel, pixmax, put_be; unsigned int bytes_per_channel, pixmax, put_be;
@@ -187,13 +187,15 @@ FF_ENABLE_DEPRECATION_WARNINGS
bytestream2_put_be32(&pbc, 0L); /* dummy */ bytestream2_put_be32(&pbc, 0L); /* dummy */
/* name */ /* name */
bytestream2_skip_p(&pbc, 80); for (i = 0; i < 80; i++)
bytestream2_put_byte(&pbc, 0L);
/* colormap */ /* colormap */
bytestream2_put_be32(&pbc, 0L); bytestream2_put_be32(&pbc, 0L);
/* The rest of the 512 byte header is unused. */ /* 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) { if (s->rle) {
PutByteContext taboff_pcb, tablen_pcb; PutByteContext taboff_pcb, tablen_pcb;