Merge commit '6c5eac9a603a91a707d030d96ba97e2ef6b3ce50'

* commit '6c5eac9a603a91a707d030d96ba97e2ef6b3ce50':
  swscale: Remove unnecessary backslashes
  jpeg2000: Fix uninitialized data errors pointed out by valgrind/memcheck

Conflicts:
	libavcodec/jpeg2000dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-05-06 21:15:47 +02:00
commit 050b48f397
2 changed files with 15 additions and 15 deletions

View File

@ -635,13 +635,13 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s,
Jpeg2000Cblk *cblk = prec->cblk + cblkno;
if (s->buf_end - s->buf < cblk->lengthinc)
return AVERROR(EINVAL);
/* A code-block data can be empty. In that case initialize data
* with 0xffff. */
if (cblk->lengthinc > 0)
/* Code-block data can be empty. In that case initialize data
* with 0xFFFF. */
if (cblk->lengthinc > 0) {
bytestream_get_buffer(&s->buf, cblk->data, cblk->lengthinc);
else {
cblk->data[0] = 0xff;
cblk->data[1] = 0xff;
} else {
cblk->data[0] = 0xFF;
cblk->data[1] = 0xFF;
}
cblk->length += cblk->lengthinc;
cblk->lengthinc = 0;
@ -864,7 +864,7 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty,
memset(t1->data[y], 0, width * sizeof(width));
/* If code-block contains no compressed data: nothing to do. */
if (cblk->length == 0)
if (!cblk->length)
return 0;
for (y = 0; y < height + 2; y++)
memset(t1->flags[y], 0, (width + 2) * sizeof(width));

View File

@ -276,8 +276,8 @@ YUV2RGBFUNC(yuva2rgba_c, uint32_t, 1)
LOADCHROMA(3);
PUTRGBA(dst_2, py_2, pa_1, 3, 24);
PUTRGBA(dst_1, py_1, pa_2, 3, 24);
pa_1 += 8; \
pa_2 += 8; \
pa_1 += 8;
pa_2 += 8;
ENDYUV2RGBLINE(8, 0)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 24);
@ -286,8 +286,8 @@ ENDYUV2RGBLINE(8, 0)
LOADCHROMA(1);
PUTRGBA(dst_2, py_2, pa_1, 1, 24);
PUTRGBA(dst_1, py_1, pa_2, 1, 24);
pa_1 += 4; \
pa_2 += 4; \
pa_1 += 4;
pa_2 += 4;
ENDYUV2RGBLINE(8, 1)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 24);
@ -310,8 +310,8 @@ YUV2RGBFUNC(yuva2argb_c, uint32_t, 1)
LOADCHROMA(3);
PUTRGBA(dst_2, py_2, pa_2, 3, 0);
PUTRGBA(dst_1, py_1, pa_1, 3, 0);
pa_1 += 8; \
pa_2 += 8; \
pa_1 += 8;
pa_2 += 8;
ENDYUV2RGBLINE(8, 0)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 0);
@ -320,8 +320,8 @@ ENDYUV2RGBLINE(8, 0)
LOADCHROMA(1);
PUTRGBA(dst_2, py_2, pa_2, 1, 0);
PUTRGBA(dst_1, py_1, pa_1, 1, 0);
pa_1 += 4; \
pa_2 += 4; \
pa_1 += 4;
pa_2 += 4;
ENDYUV2RGBLINE(8, 1)
LOADCHROMA(0);
PUTRGBA(dst_1, py_1, pa_1, 0, 0);