j2kenc: Fix pointer<->integer casts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5a6e7771ed
commit
7393b41744
@ -330,7 +330,7 @@ static uint8_t *put_sot(J2kEncoderContext *s, int tileno)
|
|||||||
uint8_t *psotptr;
|
uint8_t *psotptr;
|
||||||
|
|
||||||
if (s->buf_end - s->buf < 12)
|
if (s->buf_end - s->buf < 12)
|
||||||
return -1;
|
return NULL;
|
||||||
|
|
||||||
bytestream_put_be16(&s->buf, J2K_SOT);
|
bytestream_put_be16(&s->buf, J2K_SOT);
|
||||||
bytestream_put_be16(&s->buf, 10); // Lsot
|
bytestream_put_be16(&s->buf, 10); // Lsot
|
||||||
@ -950,8 +950,8 @@ static int encode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
for (tileno = 0; tileno < s->numXtiles * s->numYtiles; tileno++){
|
for (tileno = 0; tileno < s->numXtiles * s->numYtiles; tileno++){
|
||||||
uint8_t *psotptr;
|
uint8_t *psotptr;
|
||||||
if ((psotptr = put_sot(s, tileno)) < 0)
|
if (!(psotptr = put_sot(s, tileno)))
|
||||||
return psotptr;
|
return -1;
|
||||||
if (s->buf_end - s->buf < 2)
|
if (s->buf_end - s->buf < 2)
|
||||||
return -1;
|
return -1;
|
||||||
bytestream_put_be16(&s->buf, J2K_SOD);
|
bytestream_put_be16(&s->buf, J2K_SOD);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user